About this tool
The CSS Named Colors Reference catalogs all 148 standard named color keywords ratified across W3C HTML, CSS Color Module Level 4, and SVG 1.0 specifications (including 16 basic colors plus 130+ extended keywords). Featuring bidirectional fuzzy filtering, chromatic hue family grouping, real-time HEX/RGB/HSL conversion, and contrast-adapted previews, it serves as an indispensable desktop companion for frontend engineers and design system maintainers.
How to Use This Tool (Step-by-Step)
Search by Name, Keyword, or Hex
Type intuitive identifiers like 'tomato', 'cornflowerblue', or raw hexadecimal values to filter instantly.
Browse by Chromatic Families
Filter through structured red, blue, green, pastel, or greyscale categories with contrast legibility previews.
Copy Clean CSS Declaration
Click to copy the naked keyword string ('goldenrod'), hex code ('#DAA520'), or modern functional syntax.
W3C Spec-Complete 148 Keywords
Exhaustively catalogs all standardized keywords natively supported across modern browser rendering engines.
Case-Insensitive & Alias Parsing
Handles British/American alternate spellings seamlessly (e.g., 'gray' vs 'grey', 'darkslategray' vs 'darkslategrey').
Universal Zero-Dependency Support
Named colors execute natively inside stylesheets without custom tokens, preprocessors, or asset overhead.
CSS Named Colors Gotchas & Conventions
- •The Famous 'DarkGray' Paradox: Due to historical X11 color mappings, darkgray (#A9A9A9) is actually visibly lighter than standard gray (#808080). Be mindful of this quirk when specifying tonal shades.
- •Unquoted Identifier Syntax: In CSS, named colors are unquoted identifiers (color: crimson;). Wrapping keywords in quotes (color: "crimson";) renders the declaration invalid.
- •The Historic Tribute of 'rebeccapurple': Color #663399 was officially inscribed into the W3C spec in honor of CSS pioneer Eric Meyer's daughter Rebecca, representing modern web solidarity.
Code & Transformation Examples
Named Keyword vs Physical Color Values
color: rebeccapurple;HEX: #663399 | RGB: rgb(102, 51, 153) (致敬 CSS 奠基人女儿命名)* Named colors map to exact sRGB hex standards and can be used interchangeably in CSS stylesheets.
Resolving Named Color to Computed RGB
function getComputedRgb(colorName) {
const el = document.createElement("div");
el.style.color = colorName;
document.body.appendChild(el);
const resolved = window.getComputedStyle(el).color;
document.body.removeChild(el);
return resolved;
}getComputedRgb("coral"); // 返回: "rgb(255, 127, 80)"* Browser rendering engines internally resolve all keyword strings into standard functional rgb values.
Frequently Asked Questions
Q: Do named CSS colors impact rendering speed or performance?
A: Not at all. Named colors are hardcoded inside browser C++ hash tables, resolving instantaneously without hexadecimal conversion overhead.
Q: Why do enterprise design systems favor hex or CSS variables over named colors?
A: Named colors are discrete and non-parametric, making it difficult to construct systematic 50-900 tonal shade steps. Design systems prioritize structured variables for consistency.
Q: Is there any difference between 'gray' and 'grey'?
A: There is zero difference. The W3C specification aliases American and British spellings to identical hexadecimal definitions across all rendering engines.