Back Color

Color Name from Hex

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.

Last updated: May 2026 · Reviewed by FreeDevTool design engineering team
#FF6347

Nearest Named Color

Tomato
#FF6347 · distance 0

Color Values

HEX#FF6347
RGBrgb(255, 99, 71)
HSLhsl(9, 100%, 64%)

Top 5 Closest Matches

Browse all 147 named colors

Copied!

CSS named colors — history, the 147 names you can use, and when to actually use them

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.

Where the 147 names came from

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.

The 147 names — categorized

The list is more interesting if you group it by hue. Roughly:

Hue familyCountNotable names
Reds / pinks16Crimson, DeepPink, HotPink, IndianRed, LightCoral, LightPink, MediumVioletRed, MistyRose, PaleVioletRed, Pink, Salmon, DarkSalmon, LightSalmon, Tomato
Oranges4Coral, DarkOrange, Orange, OrangeRed
Yellows11DarkKhaki, Gold, Khaki, LemonChiffon, LightGoldenRodYellow, LightYellow, Moccasin, PaleGoldenRod, PapayaWhip, PeachPuff, Yellow
Greens21Chartreuse, DarkGreen, DarkOliveGreen, ForestGreen, GreenYellow, Honeydew, Lime, LimeGreen, MediumSeaGreen, MediumSpringGreen, MintCream, Olive, OliveDrab, PaleGreen, SeaGreen, SpringGreen, YellowGreen
Cyans / aquas9Aqua, Aquamarine, Cyan, DarkCyan, DarkTurquoise, MediumAquamarine, MediumTurquoise, PaleTurquoise, Turquoise
Blues21AliceBlue, BlueViolet, CadetBlue, CornflowerBlue, DarkBlue, DarkSlateBlue, DeepSkyBlue, DodgerBlue, LightBlue, LightSkyBlue, LightSteelBlue, MediumBlue, MidnightBlue, Navy, PowderBlue, RoyalBlue, SkyBlue, SlateBlue, SteelBlue
Purples / magentas16BlueViolet, DarkMagenta, DarkOrchid, DarkViolet, Fuchsia, Indigo, Lavender, Magenta, MediumOrchid, MediumPurple, Orchid, Plum, Purple, RebeccaPurple, Thistle, Violet
Browns / earth17Bisque, BlanchedAlmond, Brown, BurlyWood, Chocolate, Cornsilk, DarkGoldenRod, GoldenRod, Maroon, NavajoWhite, Peru, RosyBrown, SaddleBrown, SandyBrown, Sienna, Tan, Wheat
Whites / off-whites9AntiqueWhite, FloralWhite, GhostWhite, Ivory, Linen, OldLace, SeaShell, Snow, White, WhiteSmoke
Grays11Black, DarkGray, DarkSlateGray, DimGray, Gainsboro, Gray, LightGray, LightSlateGray, Silver, SlateGray

Nearest-color math — RGB Euclidean vs perceptual distance

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:

AlgorithmColor spacePerceptual accuracyCost
Euclidean RGBsRGBLowTrivial
Weighted RGB (CompuPhase)sRGB with empirical weightsMediumTrivial
Delta E 76 (CIE76)CIE LABGoodModerate
Delta E 94 (CIE94)CIE LAB with industry weightsBetterModerate
Delta E 2000 (CIEDE2000)CIE LAB with hue/chroma correctionsBestHigh
OKLAB / OKLCH deltaOKLAB (2020)Best, simpler than CIEDE2000Moderate

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.

What the distance number means in practice

For 8-bit RGB Euclidean distance:

When to use named colors in production CSS

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.

Common color-naming mistakes

Frequently Asked Questions

How do I find the color name from a hex code?
Paste your hex code into the input box or use the color picker. The tool instantly compares your color against all 147 standard CSS named colors using Euclidean distance in RGB space, and returns the closest match. You also see the next four closest names for context. Because only 147 names exist across 16.7 million possible RGB values, the "match" is often approximate — always check the distance metric to judge how close the name really is.
How many CSS named colors are there?
There are 147 standard CSS named colors recognized by every modern browser. This includes the 17 original HTML 4.01 colors (black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua, orange) plus 130 additional X11 colors added in CSS3. Notable examples include Tomato, DodgerBlue, RebeccaPurple (added in 2014), MediumSeaGreen, and PapayaWhip. Some colors are aliases: aqua and cyan share the same hex value, as do fuchsia and magenta.
What algorithm is used to find the nearest color?
This tool uses Euclidean distance in RGB color space: 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.
Can I use named colors in modern CSS?
Yes — all 147 CSS named colors work in every modern browser and are part of the CSS Color Module Level 4 specification. They're valid anywhere a color value is accepted: 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.
Why do two very different hex codes sometimes map to the same name?
The 147 named colors are sparsely distributed across the 16.7 million possible RGB values — on average each name "owns" about 114,000 colors. Any hex that falls in the Voronoi region closest to DarkSlateGray, for instance, maps to DarkSlateGray even if it's visually distinct. That's why we show the top 5 closest matches with their distance metric: a low distance (under 10) means the name is genuinely accurate; a high distance (over 40) means the name is just the least-bad approximation.
What does the distance number represent?
The distance is the straight-line distance between your color and the named color in 3D RGB space, where each channel ranges 0–255. The maximum possible distance is about 441 (pure black to pure white). As a rough guide: 0 = exact match; 1–10 = virtually indistinguishable; 11–30 = close match a human would consider the same color family; 31–60 = same hue, different shade; 60+ = the name is a rough approximation.

Browse all 50 free developer tools

All tools run in your browser, no signup required, nothing sent to a server.