With the many different browsers and operating systems using different color palettes not all colors render exactly the same on each one. While a particular shade of blue looks just the way you want it to on your home computer using Windows XP and Internet Explorer, it might look different to another viewer using the same operating system along with Netscape Navigator. Viewers of your web site may be using a completely different platform such as a MAC. The solution was to find the colors that rendered the same way regardless of platform, operating system or browser. These colors are referred to as web-safe or browser safe colors. Of all the available colors, some 16.7 million, 216 have been shown to render the same on all platforms and browsers. The only difference would be in the way a particular monitor has been adjusted.
The most straight forward way to display a color is to use a color name as the value in the color or bgcolor attribute. For example:
changes the color of the displayed text to blue
ends the color value assignment and your text goes back to the original color assignment.
Style sheets use a slightly different format. the two examples below will set background color, a background image, and the font color.
Most major browsers support the use of 140 color names. The 17 color names (aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow, and orange) and the colors represented by them above are the only color names that can be validated by the World Wide Web Consortium (W3C) and should be the only "names" that you use in your HTML or CSS documents.
If you don't see the color that you want to use in that
very short list of color names you will have to use a different color
notation method to display color choices.
Hexadecimal notation is simply put a different way of counting. Using the numbers 0-9 and the letters A-F with F being the largest value of them all.
0 1 2 3 4 5 6 7 8 9 A B C D E F
Using a set of these numbers we can assign a value to a color attribute. In much the same way an artist mixes different colors of paint to come up with just the color they are looking for, we can mix our colors. Which differs from the artist using paints and the subtractive color method. Mixing colors that happen to be web safe we are going to have to narrow the field of possibilities down. The only web safe combinations of color use 00, 33, 66, 99, CC, and FF as values.
Each color is a combination of three paired bits (2 hexadecimal numbers) which will define the amount of RED, GREEN, and BLUE, combined to render our color.
The color red results from the hexadecimal
number #FF0000. The pound sign (#) is a way of letting the browser know it
is looking at a hexadecimal number. The pound sign is required. The next
two characters (FF) assign a value for the amount of red to be used, the
next two characters (00) assign a value for the amount of green to be
used, and the final two characters (00) assign a value for the amount of
blue to be used.