Skip to main content

HEX Color to Name

Find the name of a HEX color: enter a HEX code (#RRGGBB, #RGB, with or without #) to get the closest CSS named color by Euclidean RGB distance, whether it's an exact match, and a ranked list of nearby named colors.

Input

A HEX color like #FF5733, FF5733, #F53 or F53 (with or without #).

How many of the closest CSS named colors to list.

Output

"Exact match" when the HEX equals a CSS color exactly, otherwise "Closest match".

Closest CSS Named Colors
Color NameHEXRGBDistance
No data yet
Was this helpful?

Guides

Turn any HEX code into a color name

Ever had a HEX value like #6395EE and wondered what to call it? This tool takes any HEX color code and finds the closest CSS named color — the human-readable keywords like red, tomato, cornflowerblue, and rebeccapurple's neighbors that browsers understand natively. Paste a code, and you get the nearest name, whether it's an exact match, and a ranked shortlist of the colors closest to yours.

It runs entirely in your browser. Nothing you type is uploaded or logged.

How to use it

  1. Enter a HEX color in the input. Every common form is accepted: #FF5733, FF5733, the three-digit shorthand #F53, or F53 — with or without the leading #.
  2. Optionally choose how many nearby colors to list (1–10).
  3. Read the result: the closest color name, an Exact match / Closest match badge, and a table of the nearest CSS colors with their HEX, RGB, and distance values. Copy the name, or download the full list as CSV.

How the closest color is calculated

The tool compares your color against the 140 standard CSS3 / X11 named colors — the same list your browser resolves when you write color: teal. Each named color has an exact, specification-defined RGB value.

Matching uses Euclidean distance in RGB space: it treats each color as a point (R, G, B) and measures the straight-line distance between your color and every named color:

distance = √( (R₁−R₂)² + (G₁−G₂)² + (B₁−B₂)² )

The name with the smallest distance wins. A distance of 0.00 means your HEX is identical to that CSS color, which the tool flags as an Exact match. Any other value is a Closest match, and the distance number tells you how far off you are — small numbers (under ~10) are visually indistinguishable, while larger numbers mean a noticeably different shade.

Why RGB distance?

RGB Euclidean distance is fast, transparent, and deterministic — the same input always yields the same answer. It's the standard approach for "what do I call this color" lookups. It weights each channel equally, so it isn't a perfect model of human vision, but for naming a color against a fixed 140-entry palette it's more than accurate enough, and the ranked list lets you eyeball alternatives yourself.

What counts as an exact match?

Only HEX codes that equal a CSS color's canonical value exactly. For example #FF0000 is exactly red, #2E8B57 is exactly seagreen, and #00FFFF resolves to aqua (its earlier-listed synonym cyan shares the same value).

Frequently asked questions

Does it work offline?

Yes. All 140 color values and the matching math ship with the page and run client-side, so it works without a network connection and keeps your input private.

Can I go the other way, from a name to a HEX code?

This tool goes HEX → name. Because the table shows each match's HEX and RGB, you can also use it to sanity-check a name you have in mind by finding it in the results.

What formats can I paste?

Six-digit HEX (#RRGGBB), three-digit shorthand (#RGB, expanded by doubling each digit), each with or without the #. Anything that isn't valid HEX is rejected with a clear message.

colorhexcsscolor namergbconverterdesign

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.