toolfree

CSS named colours

Every CSS named colour with its hex value, sortable by hue and lightness. Click to copy.

Runs in your browser

Click a swatch to copy its name; click the hex to copy that.

The names are a historical accident, not a system

They arrived from the X11 window system by way of early Netscape, and nobody designed the set. That is why it contains four different browns, two spellings of grey, and papayawhip.

Because the web cannot break, the oddities are permanent. The useful ones to know:

darkgray is lighter than gray. darkgray is #a9a9a9 and gray is #808080. The names come from two palettes that were merged, and by the time anyone noticed, pages depended on both.

gray and grey both work, as do darkgray/darkgrey, lightgray/lightgrey, dimgray/dimgrey, slategray/slategrey and the darkslate and lightslate pairs. Same values, either spelling.

aqua and cyan are the same colour, as are fuchsia and magenta. The first of each pair came from the original HTML set and the second from X11.

rebeccapurple

#663399 is the only colour in CSS added for a reason that is not technical.

Eric Meyer, one of the people who documented CSS as it was being built, lost his daughter Rebecca to brain cancer in 2014, on her sixth birthday. Purple was her favourite colour. The CSS Working Group added rebeccapurple to the specification shortly afterwards, and it shipped in every browser.

The value is #639 in shorthand, which was chosen deliberately.

When to use a name

For prototyping and debugging they are excellent — red is faster to type than #ff0000 and obvious in a diff.

For anything shipped, use your own values. The named set has no consistent lightness scale, no relationship between the colours, and picking from it tends to produce a page that looks like the 1996 palette it came from.

Nothing is uploaded

The table is in this page.