Color Name Lookup
Find the closest CSS named color for any hex, or look up the hex behind any CSS color keyword.
Find the CSS name for a color
Exact match: royalblue
Top 8 closest CSS named colors
royalblueexact#4169E1rgb(65, 105, 225)ΔE 0.00slatebluenearest#6A5ACDrgb(106, 90, 205)ΔE 12.57mediumslatebluenearest#7B68EErgb(123, 104, 238)ΔE 15.42mediumpurplenearest#9370DBrgb(147, 112, 219)ΔE 19.81dodgerbluenearest#1E90FFrgb(30, 144, 255)ΔE 20.07cornflowerbluenearest#6495EDrgb(100, 149, 237)ΔE 27.21darkslatebluenearest#483D8Brgb(72, 61, 139)ΔE 28.75rebeccapurplenearest#663399rgb(102, 51, 153)ΔE 28.76
Reverse lookup — name to hex
/* Input color */
--target-hex: #4169e1;
--target-rgb: rgb(65, 105, 225);
--target-hsl: hsl(225, 73%, 57%);
/* Closest CSS named colors (CIE Lab ΔE) */
--royalblue: #4169e1; /* ΔE 0.00 */
--slateblue: #6a5acd; /* ΔE 12.57 */
--mediumslateblue: #7b68ee; /* ΔE 15.42 */
--mediumpurple: #9370db; /* ΔE 19.81 */
--dodgerblue: #1e90ff; /* ΔE 20.07 */Browse all 148 CSS named colors
How to use the color name lookup
Paste any hex, drag the HSL sliders, or click a swatch in the browse grid to set your target color. The tool sorts all 148 CSS named colors by perceptual distance and shows the eight closest matches with their hex, RGB, and ΔE score. A ΔE under 2.3 is the threshold most humans stop perceiving a difference — anything below that is safe to swap in your stylesheet as the named keyword.
The reverse-lookup field goes the other way: type a CSS keyword like rebeccapurple, papayawhip, or darkslategray and the tool resolves it to its exact hex. Handy when you see an unfamiliar name in legacy CSS and want to know what it actually paints, or when you are double-checking whether lightgray and lightgrey really are the same color (they are — both spellings map to #d3d3d3).
Distances are computed in CIE Lab with a CIE76 ΔE metric. Lab is perceptually uniform, so a distance of 5 between two colors looks the same whether you compare two blues or two yellows — RGB distance would favor green-heavy colors because human eyes are most sensitive to green. The “exact” / “imperceptible” / “close” labels are derived from the classic ΔE thresholds photographers and printers use when matching Pantone swatches.
Use this tool when your designer hands you a raw hex and you want to know if there is a shorter, more readable CSS keyword available, or when you are writing documentation and want to name a color you have been using. The copy button on the CSS block exports your input color plus the top five closest named colors as CSS custom properties, ready to paste into any stylesheet.
Related Tools
- 01·COLColor Format Converteraccent · #3A86FF
Paste any color value and instantly see it in HEX, RGB, RGBA, HSL, HSLA, and HSV. Copy any format with one click.
- 01·COLColor Palette Generatoraccent · #FF006E
Generate complementary, analogous, triadic, and more color harmonies from any base color. Export as CSS variables, Tailwind config, SCSS, or JSON.
- 01·COLColor Mixeraccent · #8338EC
Blend two colors at any ratio in RGB or HSL space and copy the resulting hex, RGB, and HSL values instantly.
- 01·COLContrast Checkeraccent · #1F1F1F
Check foreground and background color pairs against WCAG 2.1 AA and AAA requirements for normal and large text.
Runs in your browser.
Every color, gradient and CSS output is generated on this page. Nothing is uploaded, logged or shared.