Color · About 148
CSS named colors
About 148 keyword colors, from aliceblue to yellowgreen.
Key facts
| Count | About 148 |
|---|---|
| Example | rebeccapurple = #663399 |
| Special keyword | transparent = rgba(0,0,0,0) |
| Case | Case-insensitive |
| Origin | X11 and SVG lists |
| Deprecated | System colors like ButtonFace |
Names are aliases, not variables
A named color resolves to one fixed value at parse time. gray and grey are both accepted, and darkgray is not a theme-aware token. For design systems, define custom properties instead of scattering names through a stylesheet.
Accessibility caveat
Names say nothing about contrast. yellow on white fails WCAG text contrast despite being a valid keyword. Check the actual luminance ratio rather than trusting the name.
Frequently asked questions
How many CSS named colors are there?
About 148 in CSS Color 4. The exact count depends on whether aliases are counted separately.
Is transparent a named color?
It is a keyword that resolves to fully transparent black; treat it as a special value rather than a palette entry.
Why is rebeccapurple in the list?
It was added as a tribute to Rebecca Meyer and is now part of the specification.