CSS Units

Colors

Name Value
In your css you'd place:
color: red
rgb(x,x,x) Values
In your css you'd place:
color: rgb(255,0,0);
Hex Number
In your css you'd place:
color: #ff0000

Summary

The color unit you use will either give you a very limited color (the naming convention) palette or a very wide range (using rgb and hex values).

In the beginning of "web design", the designer had to seriously worry about those with limited color capable monitors, thus the naming convention was used. Originally only 16 colors could be used by name. The color names are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. A collection of nearly 150 color names are supported by all major browsers.

With the development of color support in monitors, a grand total of 256 colors, the designer's choice moved from 16 to a "Web Safe Color" grand total of 216 colors. Sweet Mable!

Today, most everyone (except my parents ... no, wait, I think even they have upgraded) ... most everyone can support "millions" of colors. That's good, because you can actually get around 16.7 million colors using the hex value system. And yet so many sites just use the primary Red, Green, Blue, and Yellow ... how sad...

While I don't expect you to memorize all 16,777,216 combinations of hex values, it is good to know how you can get any color you want.

Online Color Tools