Color Name Finder
Find the nearest CSS color name for any HEX code. Browse 141 CSS named colors.
Best for: Putting a human name to a hex code from a design handoff, and finding the closest named colour when a client asks what to call it
Limitations: Returns the nearest named colour rather than an exact match, and it covers common web and CSS names rather than Pantone references
Best suited for: Designers writing documentation who need to describe a colour in words, not codes
Where the Names Come From
The tool's list, CSS_COLORS in the site's shared app.js, has 141 names. The named color table in CSS Color 4 has 148: the tool leaves out the seven "grey" spellings (such as grey and slategrey), which the spec lists beside the "gray" ones with the same values. Every hex in the tool matches the spec. Aqua and cyan share #00FFFF, and fuchsia and magenta share #FF00FF, so the 141 names cover 139 colors. The spec says 16 names came from the VGA palette and most of the rest from one version of the X11 color system, and that the names are "not even internally consistent": darkgray is lighter than gray.
How Nearest-Name Matching Works
findNearestCss treats each color as a point with red, green and blue coordinates from 0 to 255 and picks the name at the shortest straight-line distance. Delta is that distance rounded to a whole number; 0 means an exact match. On a tie the first name in the list wins, which is why #00FFFF shows aqua rather than cyan.
| Your hex | Nearest name | Its hex | Delta |
|---|---|---|---|
#808081 | gray | #808080 | 1 |
#FDE68A | khaki | #F0E68C | 13 |
#64748B | slategray | #708090 | 18 |
#7C3AED | blueviolet | #8A2BE2 | 23 |
#0F766E | teal | #008080 | 25 |
#3B82F6 | royalblue | #4169E1 | 33 |
Computed with this tool's own code (method). The last row is where a name misleads: royalblue has green 105 and blue 225 against 130 and 246, and is only the least distant of 141 names. RGB distance is also not perceptual: it weighs a step in blue the same as a step in green, although in the WCAG luminance formula green counts 0.7152 and blue 0.0722.
The Color Picker uses the same CSS_COLORS list and the same findNearestCss code, both kept in the shared app.js, so it shows the same name as this page.