Find and Verify CSS Named Colors for a Stylesheet
Admin ·
CSS has 148 opaque named color keywords. A keyword can make a stylesheet easier to read, and the equivalent HEX or RGB value can help when comparing that stylesheet with a design file.
Look up aqua and cyan by HEX
Choose Load worked example. The search field contains #00ffff, and the two results are aqua and cyan. Both have RGB values of 0, 255 and 255 and HSL values of 180 degrees, 100% and 50%.
Enter hsl(180 100% 50%) to find the same two results by channel values. Choose Cyan under Color family to keep both. Switch to Name Z–A and cyan appears first in the results and in the CSV.
| Keyword to look up | HEX | Equivalent keyword |
|---|---|---|
| aqua | #00FFFF | cyan |
| gray | #808080 | grey |
| fuchsia | #FF00FF | magenta |
Open the CSS Named Colors Reference exampleW3C CSS Color 4 named colorsW3C CSS Color 4 HSL color notation
Verify an alias pair in a browser
Copy either keyword into a test stylesheet and inspect the element’s computed color in browser developer tools. Compare it with the computed color from the equivalent keyword. Both examples below compute to rgb(0, 255, 255).
When reviewing source files, use a HEX search to find aliases that might be written differently in a codebase or design handoff. The displayed HSL is rounded to three decimal places, while the HEX and RGB columns show the exact sRGB byte values.
.preview-a { color: aqua; }
.preview-b { color: cyan; }W3C CSS Color 4 named colorsW3C CSS Color 4 HSL color notationCSS Object Model resolved values
Export the current search and family filters
Download matching colors CSV while the example search is active. Open the file with a CSV reader and check the name, hex, rgb, hsl and family columns. The full matching table is exported in the selected order, even when the workspace has multiple result pages.
For a table of all opaque keywords, clear the search and choose All families. The family names organize browsing. Use the CSS specification for the standardized color values.
Open the CSS Named Colors Reference exampleW3C CSS Color 4 named colors
Common questions
Why does a complete color value find an alias that typing its name does not show?
A keyword search matches the name you type. A HEX, RGB or HSL value searches the displayed sRGB bytes and returns any keyword with those bytes.
Can a grayscale keyword have a useful HSL hue?
At zero saturation the hue is powerless. The lightness determines the shade, and the tool displays hue 0 for that case.