Color Name Lookup
Find the closest CSS named color for any hex, or reverse lookup the exact hex behind every CSS color keyword.
Find the closest CSS named color for any hex, or reverse lookup the exact hex behind every CSS color keyword.
Find the closest CSS named color for any hex, or look up the hex behind any CSS color keyword.
Exact match: royalblue
royalblueexactslatebluenearestmediumslatebluenearestmediumpurplenearestdodgerbluenearestcornflowerbluenearestdarkslatebluenearestrebeccapurplenearest/* 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 */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.
Paste any color value and instantly see it in HEX, RGB, RGBA, HSL, HSLA, and HSV. Copy any format with one click.
Generate complementary, analogous, triadic, and more color harmonies from any base color. Export as CSS variables, Tailwind config, SCSS, or JSON.
Blend two colors at any ratio in RGB or HSL space and copy the resulting hex, RGB, and HSL values instantly.
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.