Appendix A. Color Names and RGB Values
Netscape was the first to deploy a library of color names (originally adopted from the X Window System palette known as X11 color names) that could be used as attribute and scripted object property color values in place of hexadecimal triplet values. Virtually all modern browsers support the use of these values, and CSS Level 3 puts the list into a published standard. Color names in both tag attributes, scripts, and CSS properties are case-insensitive. Typically, if you set a color attribute or property to one of the named colors, the object property is reflected in scripts as the hexadecimal triplet value for that color. For additional convenience, the following table also shows the decimal equivalents of the RGB value in case you use these color values in style sheet rules. Be aware that some colors in this collection require 16- or 24-bit color to achieve the proper hue.
A small subset of these colors—16 to be exact—appear within the HTML 4 specification. Those colors are shown in the table followed by an asterisk (*).
Color name |
Red |
Green |
Blue |
Red |
Green |
Blue |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get Dynamic HTML: The Definitive Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.