Named Color Finder

Find the closest CSS color name for any HEX, RGB or HSL value.

Runs in your browserUpdated Built and maintained by Leon and Henrik

Paste any HEX, RGB or HSL color and instantly see the closest CSS color name — with the five nearest matches, swatches and a perceptual match score. Free. No sign-up. Runs in your browser, nothing is uploaded.

Named Color Finder
Your color · #4F7CDB≈ cornflowerblue
CLOSEST CSS NAMED COLORS
cornflowerblueBest match
#6495ED89.1% matchΔE 10.9
dodgerblue
#1E90FF87.3% matchΔE 12.7
royalblue
#4169E182.3% matchΔE 17.7
mediumpurple
#9370DB77.4% matchΔE 22.6
slateblue
#6A5ACD76.6% matchΔE 23.4
Runs in your browser
Nothing is uploaded

Paste a color and the finder tells you the nearest CSS named color — the keyword you could write instead of the hex — plus four runners-up. Each match shows its swatch, its hex, the perceptual distance (deltaE) and a match score, with one-click copy for the name or the hex. The default #4f7cdb, for example, comes out as cornflowerblue at deltaE 10.9: recognizably related, but not the same color.

How close is "closest"? Reading the score

The finder converts your color and every named color into CIE Lab, then measures the straight-line distance between them (the CIE76 deltaE formula). The match percentage is just 100 − deltaE. A practical guide:

deltaEMatch scoreWhat it means in practice
Under 199–100%Indistinguishable — use the name in code freely
1–2.5~97–99%Only visible side by side, if at all
2.5–5~95–97%Noticeable next to each other, fine as a label
5–10~90–95%Same family, clearly a different shade
Over 10Below 90%A rough description only

The furthest any color sits from its nearest name is around deltaE 40 — deep wine-purples such as rgb(75, 0, 45) have no named neighbor anywhere close. CIE76 is also known to overstate differences between highly saturated colors, so a vivid color scoring 90% may look a little closer than the number suggests.

Real colors, real results

InputNearest namedeltaEVerdict
#f5f0e8 (off-white)linen #faf0e62.1Safe to swap
#6c5ce7 (violet-blue)mediumslateblue #7b68ee5.8Same family
#4f7cdb (mid blue)cornflowerblue #6495ed10.9Label only
#ff5a5f (coral red)tomato #ff634715.3Label only
#2ecc71 (bright green)mediumseagreen #3cb37117.0Loose description
#333333 (dark gray)darkslategray #2f4f4f15.9Misleading — see below

The pattern: pale, low-saturation colors are well covered by the long tail of named whites (linen, seashell, floralwhite, oldlace), while saturated mid-tones and darks fall between names.

The dark-gray gap

The named grays run black (#000000), then nothing until dimgray (#696969), then gray, darkgray, silver, lightgray, gainsboro, whitesmoke, white. Every dark UI gray — the #222, #333, #444 that most interfaces use for text and dark backgrounds — lands in that hole, so the closest name is often the tinted darkslategray. Don't rename your text color to darkslategray; it's a visibly greenish blue-gray. For neutral darks, keep the hex.

148 keywords, 141 entries, 139 colors

CSS defines 148 color keywords, but the numbers shrink as you look closer:

  • Seven are spelling aliases. Every gray name also exists as grey (darkgrey, slategrey …). The finder accepts both, but shows each pair as one entry (darkgray / darkgrey), so the reference has 141 tiles for all 148 keywords and a match never appears twice.
  • Two pairs are the same color. aqua and cyan are both #00ffff; fuchsia and magenta are both #ff00ff. That leaves 139 distinct colors.
  • rebeccapurple (#663399) is the newest, added in CSS Color Level 4 in memory of Eric Meyer's daughter Rebecca. The rest trace back to the X11 window system's color list, which explains oddities like darkgray being lighter than gray.

Open Show all CSS named colors under the results to browse them, and click any swatch to load it as your input.

Name in code, or name as a label?

There are two different uses, and the score tells you which one you're allowed.

  • Writing the keyword in CSS (border-color: linen) only makes sense when the score is roughly 98% or better. Otherwise you are silently changing the color.
  • Using the name as a human label — in a design handoff, a token name like --color-cornflower, a commit message or a style guide — works at any score, as long as the label isn't presented as the exact value.

Lab distance is used instead of RGB distance because RGB gaps don't match perception: the eye is very sensitive to differences among greens and much less among dark blues, so a naive RGB match can pick a name that is numerically near but visibly wrong. Lab was designed so that equal distances look roughly equally different.

If you need the value in another format, the color converter turns it into RGB, HSL or HSV, and the color palette generator builds a scheme around it. The page address updates with every color (?c=4f7cdb), so a specific match is easy to bookmark or send.

Frequently asked questions

Related tools

All Color tools →