Dev TooloraLocal dev tools

> CSS & Design

CSS Color Name Lookup

Find the CSS named colors for a color or a name fragment, with the 5 closest names by OKLab distance.

Runs locallyWorks offline
Auto-run
Back to results
Input

Source data

Output

Result

Your result will appear here.

Tool guide

About this tool.

  • CSS defines 148 named colors, including synonyms such as aqua and cyan or gray and grey. This tool maps a color to those names, or a name fragment to the colors that contain it.
  • When the input is a color, the exact names come first. Then the 5 nearest other names follow, ranked by the distance in OKLab multiplied by 100, rounded to one decimal.
  • OKLab distance follows perceived difference better than comparing RGB channels, so the nearest name usually looks closest to the eye.

  • Finding a readable name for a hex color in a design review.
  • Checking whether a brand color is already a named CSS color.
  • Listing every named color that contains a word such as slate or sea.
  • Picking the closest keyword for a quick prototype.

Type a CSS color such as a hex code, rgb(), hsl() or oklch() value, or part of a color name.

A color input lists every exact name first, then the 5 nearest names with their distance.

A name fragment ignores case, spaces and hyphens, and lists every name that contains it with its hex value.

The table shows name, hex and distance, and the preview shows the matching swatches.

  • #00ffff gives aqua and cyan
  • #663399 gives rebeccapurple
  • #6495ec is closest to cornflowerblue
  • slate lists nine names, from darkslateblue to slategrey
  • Light Slate matches lightslategray and lightslategrey
  • rgb(255 99 71 / 0.5) is looked up as tomato and notes the ignored alpha

  • There are 148 named colors in the list.
  • Alpha is ignored for colors and noted in the summary.
  • Exact means the same 8-bit sRGB color.
  • The nearest list never repeats an exact name.
  • Fragments may contain letters, spaces and hyphens only.
  • transparent and currentColor are explained as errors.

FAQ

Questions about CSS Color Name Lookup

Why are aqua and cyan both shown?

They are different names for the same color in the CSS specification, so both are listed.

What does the ΔE column mean?

The distance is the OKLab difference multiplied by 100. Values under about 2 are hard to tell apart.

What happens with transparent colors?

The lookup ignores alpha and says so in the summary.

Why are transparent and currentColor rejected?

They are not part of the 148 named colors, because they have no fixed color of their own.

Continue with

Color MixerMix two CSS colors by weight in sRGB or the perceptual OKLab spaces and get the color-mix() rule with a resolved fallback.Color Scale GeneratorGenerate a Tailwind-style 50 to 950 shade scale from one color, as CSS variables, Tailwind v3 or v4 config or JSON.