Where the 148 colour names come from
Long before CSS existed, the X11 window system of the 1980s shipped with a text file of colour names that its developers had invented, allegedly calibrated against paint charts and a fair amount of personal taste. That is why the list has the flavour it does: papayawhip, blanchedalmond, dodgerblue and peru sit alongside sensible entries like darkgreen. The list was adopted by SVG, then folded into CSS as the extended colour keywords, and today all 148 names work in every browser. The most recent addition, rebeccapurple (#663399), was added in 2014 in memory of Rebecca Meyer, the daughter of CSS pioneer Eric Meyer, who died at the age of six. A handful of entries are duplicates: gray and grey (and their dark, dim, light and slate variants), aqua and cyan, fuchsia and magenta all point to identical values, and this tool shows every name that shares the winning hex.
How the nearest name is found
Your colour and each named colour are treated as points in a three-dimensional space whose axes are red, green and blue. The tool measures the straight-line distance between your colour and all 148 points and returns the closest:
A distance of 0 means an exact match, and anything else is labelled closest rather than exact, with the distance shown so you can judge how rough the approximation is. For scale, the farthest apart two colours can be (black to white) is about 441.7. Distances under about 30 are usually hard to tell apart in a small swatch; beyond 60 or so, expect a visibly different colour.
Worked examples
What colour names are actually good for
Names beat hex codes wherever humans are the audience. Saying a design uses steelblue and whitesmoke communicates instantly in a way #4682B4 and #F5F5F5 never will, which makes names ideal for prototypes, code examples, documentation and quick CodePen experiments, where color: tomato is both valid CSS and self-explanatory. They are also useful for describing colours in alt text and accessibility notes, and for putting an approximate label on a brand colour when you need to talk about it in plain English.
Bear the limits in mind, though. With 16,777,216 possible hex colours and only 148 names, each name covers a huge neighbourhood, and the names cluster unevenly, generous with pale pastels and pinks, sparse in the mid greens and oranges. Plain RGB distance is also not a perfect model of human vision, which is more sensitive to green differences than blue ones, so the mathematically nearest name is occasionally not the one your eye would pick. Treat the result as the nearest label rather than a substitute, and when the exact colour matters, ship the hex code. Everything runs in your browser, and no colour you enter is uploaded anywhere.
Frequently asked questions
Where do the 148 colour names come from?
Most date back to the X11 window system of the 1980s, whose colour list was adopted by SVG and then by CSS as the extended colour keywords. The newest, rebeccapurple, was added in 2014 in memory of Rebecca Meyer, the daughter of CSS pioneer Eric Meyer. All 148 work in every modern browser.
How is the closest colour chosen?
Your colour and every named colour are compared as points in RGB space, using the straight-line distance across the red, green and blue channels. The name with the smallest distance wins. A distance of 0 is an exact match, and the bigger the number, the rougher the approximation.
Can I use these names directly in CSS?
Yes. Every name here is a valid CSS colour value, so color: tomato or background: rebeccapurple works in any stylesheet, case-insensitively. Names are handy for prototypes and examples, though production code usually sticks to hex or custom properties for consistency.
Why do some colours have two names?
The list contains spelling pairs like gray and grey, and historical duplicates like aqua and cyan, or fuchsia and magenta, which point to identical hex values. When your colour lands on one of these, this tool shows all the names that share the value, and any of them will work in CSS.
Why does the closest name sometimes look quite different?
There are 16,777,216 possible six-digit hex colours and only 148 names, so each name has to cover a large neighbourhood. The names are also spread unevenly, with crowds of pale pastels and few mid greens, and plain RGB distance does not perfectly match human perception. Treat the result as the nearest label, not a twin.