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.
Text Contrast Check
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.