UTILS.
Private by default
◑?

Nearest Named Color

Find the closest CSS named colors to any color you pick.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

Nearest CSS Color Name finds which named CSS colours look most like any colour you choose. Use the colour picker, or type a hex code in the box: three or six digits, with or without the leading #, so #4b9cd3, 4b9cd3 and 4bd all work. The six closest names appear as swatches with the name and the hex value, and a colour that matches a name exactly is marked exact. Click any swatch to copy its hex code.

Closeness is measured as straight-line distance in RGB space: the tool squares the red, green and blue differences between your colour and each of the 141 names in its list, which includes rebeccapurple, and sorts by the total. That is quick and predictable, but it is not a perceptual measure, so for some hues the mathematically nearest name may not be the one your eye picks. Names with identical values, such as aqua and cyan or fuchsia and magenta, are separate entries and appear together on a tie. The list uses the gray spelling only, so grey names are not shown.

Only hex input is understood: rgb(), hsl(), colour names and 8-digit hex values are reported as invalid. The tool is useful for turning a hex value from a design file into readable CSS, naming the colours in a palette or finding a sensible named fallback.

Frequently asked questions

How is the closest color chosen?
Each of the 141 CSS named colors is compared by squared RGB distance to your color, and the six nearest are shown in order.
Which color names are included?
The standard CSS named colors, such as tomato, rebeccapurple and steelblue, that you can use directly in CSS. Only the gray spelling is listed, not grey.
What formats can I type?
Hex only: three or six digits, with or without #. Values like rgb(75, 156, 211), hsl() or a color name show an invalid message.
Is the nearest name always the one that looks closest?
Usually, but not always. RGB distance does not match how people perceive colour, so a nearby name in a different hue family can occasionally rank first. Compare the swatches by eye.

More tools