A little help goes a long way. Find a tool/

Design FIELD NOTES · 4 MIN READ

Where CSS Color Names Came From

The history of the CSS named colors: 16 HTML basics, the X11 inheritance, gray/grey aliases, and the one petitioned color.

CSS ships with a vocabulary of color words — tomato, cornflowerblue, rebeccapurple — that every browser resolves to an exact RGB value. The list looks arbitrary, and in places it is, but it has a traceable history: sixteen HTML colors, a large inheritance from Unix's X11 window system, a spelling schism, and exactly one color added by public petition.

Sixteen colors and a crawling start

The earliest web palette was tiny: sixteen basic colors defined for HTML 2.0-era browsers — aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow. They came from the VGA palette that early PCs displayed, and they encode two quirks that still confuse developers today. First, gray is darker than darkgray (the "dark" prefix lost meaning when X11 names collided with VGA values). Second, green is #008000, a dark forest green, while lime (#00ff00) is the full-intensity green of the RGB triplet — the names and the math disagree.

X11 donates 130 more

By the late 1990s browsers wanted a richer vocabulary, and the obvious source was the X11 color system used on Unix workstations, which itself descended from lists of crayon-like names at MIT and in Berkeley. CSS3 standardized the X11-derived set — aliceblue, burlywood, chartreuse and friends — with values adjusted to fit the sRGB gamut browsers could actually display. Notably the spec authors kept a few X11 duplicates intact: cyan joins aqua with the identical value #00ffff, and magenta mirrors fuchsia at #ff00ff. These are true aliases: two keywords, one color.

The gray/grey spelling schism

British and American spelling both won. The list contains seven gray/grey pairs — gray/grey, dimgray/dimgrey, darkgray/darkgrey, darkslategray/darkslategrey, lightgray/lightgrey, lightslategray/lightslategrey, slategray/slategrey — each pair resolving to the same value. This is why careful style guides pick one spelling and lint for it: background: grey and background: gray both work, but mixing them across a codebase makes diffs noisy. Counting rules follow from this: 148 official keywords, 9 of them aliases (cyan, magenta, and the seven grey spellings), leaving 139 distinct colors.

rebeccapurple: the only petitioned color

Every other name descends from decades-old palettes. rebeccapurple (#663399) is the exception. In 2014 Eric Meyer — a foundational CSS spec author — lost his six-year-old daughter Rebecca to brain cancer. Rebecca had just reached the age at which, by family tradition, she would be called by her full name rather than "Becca". Meyer asked the CSS working group to add the color as a memorial, and the community rallied: the CSS Color Module Level 4 specification added it, making it the only named color chosen by public petition rather than inherited history.

How names map to numbers — and when to use them

Every keyword is exactly equivalent to a hex code: tomato is #ff6347 is rgb(255, 99, 71). The hex digits are just the red, green and blue components written in base 16 — each pair runs from 00 (none) to ff (full). Nothing magical happens at render time; the browser swaps the word for the number during parsing. That equivalence is why a reference of names and hex codes is also a translation table: pick the readable name in code you share, and the precise hex when you need to match a brand color pixel for pixel.

Names shine for readability and intent — ghostwhite documents itself in a code review in a way #f8f8ff never will, and prototyping with hotpink makes temporary styles obvious. Hex codes win everywhere else: they cover all 16.7 million colors rather than 139, they round-trip through design tools, and they make subtle differences visible (#fafafa vs #f5f5f5 reads better than "whitesmoke vs whitesmoke-ish"). Teams that need both often use names for semantic tokens and hex for final values.

Try it yourself

The HTML Color Names tool lists all 148 keywords with hex codes, RGB values and click-to-copy swatches, searchable by name or code and filterable into basic, extended and alias groups. To convert any value in the other direction — hex to rgb(), hsl(), or back — use the Color Converter, and for live experimentation with a full picker, the Color Picker shows how a chosen color behaves across formats.

Frequently asked questions

How many named colors does CSS have today?
The CSS Color Module Level 4 table lists 148 keywords: 16 basic colors from early HTML, the extended set inherited largely from X11 and standardized in CSS3, and rebeccapurple added in 2014. Nine of the 148 are aliases — cyan equals aqua, magenta equals fuchsia, and seven "grey" spellings mirror their "gray" counterparts — leaving 139 distinct colors.
Why is green so dark in CSS?
The 16 basic colors came from the VGA palette, where the green channel had an on/off simplicity: green is #008000 (half intensity) while lime is #00ff00 (full intensity). The names were standardized before anyone worried that "green" reads as brighter than #008000 looks, and browsers kept the values for compatibility.
Is darkgray really darker than gray?
No — darkgray (#a9a9a9) is lighter than gray (#808080). The contradiction happened when X11 names met VGA values: X11 used a different reference palette, so "dark" and "light" stopped meaning anything consistent among grays. The names are standardized, not sensible.
What is the story behind rebeccapurple?
Eric Meyer, a foundational CSS spec author, lost his six-year-old daughter Rebecca to brain cancer in 2014. She had just reached the family age of being called by her full name, and purple was her favorite color. The CSS working group added rebeccapurple (#663399) to Color Level 4 as a memorial — the only named color added by community petition.
Are color names less precise than hex codes?
Not at all — a keyword resolves to the exact same sRGB value as its hex equivalent at parse time (tomato is #ff6347 is rgb(255, 99, 71)). The real trade-off is coverage and intent: names offer 139 distinct readable choices, hex offers 16.7 million exact values.