Find the color name from hex code in a single click. Paste any hex value or pick a color, and this tool identifies the nearest CSS named color from the full list of 147 standard names — plus the four runner-up matches with their distance metric. You also see RGB and HSL equivalents, can copy either the color name or hex value to your clipboard, and browse every CSS named color in a searchable grid. Useful when you have a random hex from a screenshot, a design tool, or a brand palette and want the closest human-readable name.
Tomato. RebeccaPurple. PapayaWhip. The CSS named-color list is one of the quirkiest legacy artifacts on the web platform — 147 names inherited from a 1989 X11 desktop, frozen into the CSS Color Module Level 4 spec, and still valid in every modern browser. Most professional codebases never use them in production, but they show up in tutorials, demos, browser DevTools, and color-naming tools like this one. This guide covers where the names came from, how nearest-color algorithms actually work, the perceptual-vs-RGB distance debate, and the design-system patterns that have replaced "named colors" in real-world projects.
The story starts at MIT in 1989. The X Window System needed a way for users to specify colors without remembering hex, so the maintainers shipped rgb.txt — a file mapping ~600 ASCII names to RGB values. Many of the names came from a paint-color sample book one of the developers happened to own (Sinclair Paints), which is why CSS today inherits "PapayaWhip" and "MistyRose" rather than something more systematic.
rgb.txt: 130 additional names.rebeccapurple (#663399) — a tribute to web-design pioneer Eric Meyer's daughter Rebecca, who died at age 6.The list is more interesting if you group it by hue. Roughly:
| Hue family | Count | Notable names |
|---|---|---|
| Reds / pinks | 16 | Crimson, DeepPink, HotPink, IndianRed, LightCoral, LightPink, MediumVioletRed, MistyRose, PaleVioletRed, Pink, Salmon, DarkSalmon, LightSalmon, Tomato |
| Oranges | 4 | Coral, DarkOrange, Orange, OrangeRed |
| Yellows | 11 | DarkKhaki, Gold, Khaki, LemonChiffon, LightGoldenRodYellow, LightYellow, Moccasin, PaleGoldenRod, PapayaWhip, PeachPuff, Yellow |
| Greens | 21 | Chartreuse, DarkGreen, DarkOliveGreen, ForestGreen, GreenYellow, Honeydew, Lime, LimeGreen, MediumSeaGreen, MediumSpringGreen, MintCream, Olive, OliveDrab, PaleGreen, SeaGreen, SpringGreen, YellowGreen |
| Cyans / aquas | 9 | Aqua, Aquamarine, Cyan, DarkCyan, DarkTurquoise, MediumAquamarine, MediumTurquoise, PaleTurquoise, Turquoise |
| Blues | 21 | AliceBlue, BlueViolet, CadetBlue, CornflowerBlue, DarkBlue, DarkSlateBlue, DeepSkyBlue, DodgerBlue, LightBlue, LightSkyBlue, LightSteelBlue, MediumBlue, MidnightBlue, Navy, PowderBlue, RoyalBlue, SkyBlue, SlateBlue, SteelBlue |
| Purples / magentas | 16 | BlueViolet, DarkMagenta, DarkOrchid, DarkViolet, Fuchsia, Indigo, Lavender, Magenta, MediumOrchid, MediumPurple, Orchid, Plum, Purple, RebeccaPurple, Thistle, Violet |
| Browns / earth | 17 | Bisque, BlanchedAlmond, Brown, BurlyWood, Chocolate, Cornsilk, DarkGoldenRod, GoldenRod, Maroon, NavajoWhite, Peru, RosyBrown, SaddleBrown, SandyBrown, Sienna, Tan, Wheat |
| Whites / off-whites | 9 | AntiqueWhite, FloralWhite, GhostWhite, Ivory, Linen, OldLace, SeaShell, Snow, White, WhiteSmoke |
| Grays | 11 | Black, DarkGray, DarkSlateGray, DimGray, Gainsboro, Gray, LightGray, LightSlateGray, Silver, SlateGray |
This tool finds the nearest named color using Euclidean distance in RGB space:
distance = sqrt((r1-r2)² + (g1-g2)² + (b1-b2)²)
It works well enough for color naming because the 147 names are widely spaced. But Euclidean RGB has a known weakness: human eyes are more sensitive to green than red, and more sensitive to red than blue. A "10 unit" jump in red looks bigger than a "10 unit" jump in blue.
The perceptually-correct alternatives:
| Algorithm | Color space | Perceptual accuracy | Cost |
|---|---|---|---|
| Euclidean RGB | sRGB | Low | Trivial |
| Weighted RGB (CompuPhase) | sRGB with empirical weights | Medium | Trivial |
| Delta E 76 (CIE76) | CIE LAB | Good | Moderate |
| Delta E 94 (CIE94) | CIE LAB with industry weights | Better | Moderate |
| Delta E 2000 (CIEDE2000) | CIE LAB with hue/chroma corrections | Best | High |
| OKLAB / OKLCH delta | OKLAB (2020) | Best, simpler than CIEDE2000 | Moderate |
For matching one of 147 widely-spaced names, all of these produce the same answer 95%+ of the time. For applications like "find the closest Pantone for this hex" where the candidates are tightly packed, Delta E 2000 or OKLAB matters.
For 8-bit RGB Euclidean distance:
The honest answer for 2026 codebases:
The named colors that do show up in real codebases are the originals: black, white, red, green, blue, currentColor (technically not in the list but works alongside it). The exotic names are mostly for color naming, not styling.
aliceblue in production CSS. Future maintainers won't recognise it. Use --surface-cool or similar from your design system.gray and grey are different. Both spellings are valid CSS aliases for #808080.green with X11 green. CSS green = #008000 (HTML 4 dark green). X11's green in rgb.txt = #00FF00. CSS uses lime for the X11 bright green.aqua and cyan are aliases. Both are #00FFFF. Same for fuchsia and magenta (#FF00FF).aqua and cyan share the same hex value, as do fuchsia and magenta.sqrt((r1-r2)² + (g1-g2)² + (b1-b2)²). It's fast and adequate for most use cases. More perceptually accurate alternatives exist — CIEDE2000 and Delta-E in LAB space model human vision more faithfully by weighting green perception higher than blue, for example. For a color-naming tool where the 147 names are already widely spaced, the RGB distance gives results that are indistinguishable from LAB for >95% of inputs. A distance of 0 means an exact match; anything under ~10 is visually very close.background-color, color, border, box-shadow, SVG fill and stroke, and inside color-mix(). Names are case-insensitive, so DodgerBlue, dodgerblue, and DODGERBLUE all work. That said, most professional codebases prefer hex or custom properties for consistency with design systems.All tools run in your browser, no signup required, nothing sent to a server.