HTML: The Definitive Guide

Previous Appendix E  
 

E.2 Color Names

Unfortunately, determining the hexadecimal value for more esoteric colors like "papaya whip" or "navajo white" is very difficult. You can go crazy trying to adjust the RGB triple for a color to get the shade just right, especially when each adjustment requires loading a document into your browser to view the result.

The folks at Microsoft and Netscape thought so, too, and gave their browsers the ability to use color names directly in any of the color tags. Simply use the color name for the color-attribute value enclosed in quotes. Single-word color names don't require enclosing quotes, but it's good practice to include them anyway. For example, you can make all visited links in the display magenta with the following attribute and value for the body tag:

<body vlink="magenta">

The standard color names currently supported by Internet Explorer are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, yellow, and white

Not to be outdone, Netscape 2.0 and higher supports named colors as well; they just don't document the fact. Even better, Netscape supports the several hundred color names defined for use in the X Window System. Note that color names may contain no spaces; also, the word ``gray'' may also be spelled ``grey'' in any color name.

Those colors marked with an asterisk (*) actually represent a family of colors numbered one through four. Thus, there are actually four variants of blue, named ``blue1,'' ``blue2,'' ``blue3,'' and ``blue4,'' along with plain old ``blue.'' Blue1 is the lightest of the four; blue4 the darkest. The unnumbered color name is the same color as the first; thus, blue and blue1 are identical.

Finally, if all that isn't enough, there are one hundred variants of gray (and grey) numbered 1 through 100. ``Gray1'' is the darkest, ``gray100'' is the lightest, and ``gray'' is very close to ``gray75.''

The Netscape-supported colors are: aliceblue, antiquewhite*, aquamarine*, azure*, beige, bisque*, black, blanchedalmond, blue* , blueviolet, brown*, burlywood*, cadetblue*, chartreuse*, chocolate*, coral*, cornflowerblue, cornsilk*, cyan*, darkblue, darkcyan, darkgoldenrod*, darkgray, darkgreen , darkkhaki, darkmagenta, darkolivegreen*, darkorange*, darkorchid*, darkred, darksalmon, darkseagreen*, darkslateblue, darkslategray* , darkturquoise , darkviolet, deeppink*, deepskyblue*, dimgray, dodgerblue*, firebrick*, floralwhite, forestgreen, gainsboro, ghostwhite, gold*, goldenrod*, gray, green* , greenyellow, honeydew*, hotpink*, indianred*, ivory*, khaki*, lavender, lavenderblush*, lawngreen, lemonchiffon*, lightblue*, lightcoral, lightcyan*, lightgoldenrod*, lightgoldenrodyellow, lightgray, lightgreen, lightpink*, lightsalmon*, lightseagreen, lightskyblue*, lightslateblue, lightslategray, lightsteelblue*, lightyellow*, limegreen, linen, magenta*, maroon*, mediumaquamarine, mediumblue , mediumorchid*, mediumpurple*, mediumseagreen, mediumslateblue, mediumspringgreen , mediumturquoise , mediumvioletred, midnightblue , mintcream, mistyrose*, moccasin, navajowhite*, navy, navyblue, oldlace, olivedrab*, orange*, orangered*, orchid*, palegoldenrod, palegreen*, paleturquoise*, palevioletred*, papayawhip, peachpuff*, peru, pink*, plum*, powderblue, purple*, red*, rosybrown*, royalblue*, saddlebrown, salmon*, sandybrown, seagreen*, seashell*, sienna*, skyblue* , slateblue* , slategray*, snow*, springgreen* , steelblue* , tan*, thistle*, tomato*, turquoise* , violet, violetred*, wheat*, white, whitesmoke, yellow*, and yellowgreen


Previous Home  
Color Values Book Index  
 


Banner.Novgorod.Ru