Nearest Named Color
Find the closest CSS colour name to any colour.
How to use
- 1 Type a hex or rgb() colour, or use the colour picker.
- 2 Read the nearest CSS colour name and its swatch on the right.
- 3 Check the distance value to see how close the match is.
- 4 Copy the colour name with one click.
About Nearest Named Color
Nearest Named Color takes any colour you give it and finds the closest CSS colour keyword — turning an anonymous hex like #5aa0ff into a friendly name such as "dodgerblue" or "cornflowerblue".
This is useful when you want a readable label for a colour, need to map a brand value onto the nearest standard keyword, or are simply curious what a hue is conventionally called.
You can enter a colour as a hex value (full six-digit or three-digit shorthand, with or without the leading hash) or as an rgb() / rgba() string, or pick one with the native colour picker.
The tool compares your colour against a curated table of common CSS named colours using a weighted "redmean" distance in RGB space, which approximates how the human eye perceives colour differences far better than a naive channel-by-channel comparison — so the match it returns actually looks like the closest name, not just the nearest set of numbers.
Side-by-side swatches show your colour next to its nearest name, and a distance readout tells you how close the match is (zero means it is an exact named colour).
It all runs locally in your browser, with no uploads, no logging and full offline support once loaded.
FAQ
How is the nearest colour chosen?
Your colour is compared against a table of CSS named colours using a weighted "redmean" distance in RGB, which approximates human colour perception, and the closest one is returned.
What does the distance number mean?
It is the straight-line RGB distance between your colour and the matched named colour. Zero means an exact match; larger values mean the nearest name is further away.
Which colour formats are accepted?
Hex (#rgb or #rrggbb, with or without #) and rgb()/rgba() strings. The colour picker also feeds a hex value into the tool.