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

aliceblue

F0

F8

FF

240

248

255

antiquewhite

FA

EB

D7

250

235

215

aqua*

00

FF

FF

0

255

255

aquamarine

7F

FF

D4

127

255

212

azure

F0

FF

FF

240

255

255

beige

F5

F5

DC

245

245

220

bisque

FF

E4

C4

255

228

196

black*

00

00

00

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.