Named Colors
As Defined
in HTML and CSS
The following list shows all of the colors defined in the official specifications for CSS 1, CSS2, HTML 3.2, HTML 4.0, and HTML 4.01.
| Aqua = "#00FFFF" | Navy = "#000080" |
||
| Black = "#000000" | Olive = "#808000" |
||
| Blue = "#0000FF" | Purple = "#800080" |
||
| Fuchsia = "#FF00FF" | Red = "#FF0000" |
||
| Gray = "#808080" | Silver = "#C0C0C0" |
||
| Green = "#008000" | Teal = "#008080" |
||
| Lime = "#00FF00" | White = "#FFFFFF" |
||
| Maroon = "#800000" | Yellow = "#FFFF00" |
Some books list magenta and cyan as predefined colors. My experiments show cyan to be equivalent to aqua, and magenta equivalent to fuschia. The HTML 3.2, 4.0, 4.01, CSS1, and CSS2 specifications all list the same predefined color names specified above. None of them list entries for cyan and magenta. The HTML 1 and HTML 2.0 specifications did not include color.
The CSS1 Specification does not specifically define the RGB values for each color, but says, "These 16 colors are taken from the Windows VGA palette." The CSS2 Specification refers the reader back to the HTML 4 Specification for a definition of the 16 colors.
The CSS2 Specification also states, "Users may specify keywords that
correspond to the colors used by certain objects in the user's environment." In this way, authors
can make use of the user's system settings in order to create documents with the user's
defined look and feel. This also offers the advantage of being able to produce pages
that could be more accessible because the user's settings may be related to a disability.
For example, to set the foreground and background colors of a paragraph to the same foreground
and background colors of the user's window, an author might write the following:
P { color: WindowText; background-color: Window }

