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. Nothing ever leaves your browser — all 148 colors and the Lab math run locally.