CSS Color Name Lookup

Enter any hex color to find the closest named CSS color, or browse all 148 named CSS colors in a searchable, categorized grid. Click any color for details and copy in any format.

🔍 Find Closest Named Color
#
🎨 Closest Match
Your Color
Closest Named
Distance: 0.00
NAME CornflowerBlue
HEX #6495ED
RGB rgb(100, 149, 237)
HSL hsl(219, 79%, 66%)

Text Contrast Check

Black Text
4.36:1
AA
White Text
4.82:1
AA

All 148 Named CSS Colors

Frequently Asked Questions

How many named CSS colors are there?

There are 148 named CSS colors defined in the CSS Color Level 4 specification. These range from basic names like "red" and "blue" to more specific names like "cornflowerblue" and "papayawhip". All modern browsers support these named colors, and you can use them directly in your CSS instead of hex or RGB values.

How do you find the closest CSS named color to a hex value?

To find the closest CSS named color, this tool calculates the Euclidean distance in RGB color space between your input color and each of the 148 named colors. The formula is: distance = sqrt((r1-r2)² + (g1-g2)² + (b1-b2)²). The named color with the smallest distance is the closest match, shown instantly above.

Can I use CSS color names instead of hex codes?

Yes, all 148 CSS named colors work in any CSS property that accepts a color value. For example, you can write "color: cornflowerblue" instead of "color: #6495ED". Named colors are supported in all modern browsers and can make your CSS more readable. However, they only cover 148 specific shades, so for precise colors you will still need hex, RGB, or HSL values.

Embed this tool

<iframe src="https://devtoolbox.dedyn.io/tools/color-name-lookup" width="100%" height="800" frameborder="0" title="CSS Color Name Lookup"></iframe>

Text Contrast Check

Black Text
White Text
5 Closest Named Colors
Keyboard Shortcuts
Ctrl+Enter Lookup
Ctrl+Shift+C Copy hex
Ctrl+L Clear