Yes—HTML color names can be used directly in CSS wherever the relevant property accepts a named-color identifier.
Although these values are often called “HTML color names,” their standardized role in modern web development is that of CSS color keywords. The practical distinction is syntax: a name such as aqua is written as a word, while its equivalent HEX value is written as #00ffff with a hash sign.
You can use either form in a stylesheet, inline style, or another CSS context. A lookup helps when you need the exact standardized value, want to preserve the wording already used in a stylesheet, or need to confirm whether two names are aliases for the same color.

Where the names work in CSS
A CSS named color can be used anywhere the property’s grammar accepts a color. Common examples include:
- color for text and other foreground content.
- background-color for an element’s background.
- border-color and outline-color for borders and outlines.
- box-shadow when its color component accepts a named-color identifier.
Do not add a hash sign to a CSS color name. For example, color: aqua; is valid, while color: #aqua; is not a HEX value. By contrast, a copied HEX value already includes its required # prefix.
Named-color keywords are case-insensitive, so capitalization does not change which standard color is selected. Property grammar and browser support still matter, so check the target browsers when an older environment is involved. The W3C CSS Color 4 named-color reference defines the standard mappings, while the MDN named-color reference provides practical CSS syntax and browser information.
What the 148-color reference contains
The HTML Color Names Chart lists all 148 opaque named-color keywords standardized by CSS Color. Every row includes one CSS keyword, a lowercase six-digit HEX value, a decimal RGB value, and a rendered sRGB swatch. The chart preserves standardized aliases as separate rows instead of treating them as duplicate errors.
| CSS keyword | Standardized HEX | Decimal RGB | Alias detail |
|---|---|---|---|
| aqua | #00ffff | rgb(0, 255, 255) | Shares its value with cyan |
| cyan | #00ffff | rgb(0, 255, 255) | Shares its value with aqua |
| fuchsia | #ff00ff | rgb(255, 0, 255) | Shares its value with magenta |
| magenta | #ff00ff | rgb(255, 0, 255) | Shares its value with fuchsia |
| gray | #808080 | rgb(128, 128, 128) | American spelling |
| grey | #808080 | rgb(128, 128, 128) | British spelling |
These shared values do not indicate an error. There are 148 unique keyword keys, but some valid keywords intentionally resolve to the same sRGB color. Keeping those spellings separate helps when reading or maintaining an existing stylesheet that uses a particular alias.
The names are historical identifiers, not a perceptually even palette or a scientific color taxonomy. They also do not guarantee that a display reproduces a physical pigment. Nearby entries can look deceptively similar, and some names do not reflect relative lightness in a consistent way.
Find and copy a color for CSS
Use the chart as an exact lookup rather than as a color generator:
- Open the chart and type part of a CSS color name in the filter. Name matching is case-insensitive and works with fragments, so you do not need to remember the full spelling immediately.
- To search by a numeric value instead, enter an exact six-digit HEX value beginning with #, or enter a complete rgb(...) string. These numeric searches use exact matching.
- Review the matching keyword, rendered swatch, lowercase HEX value, and decimal RGB mapping. The chart does not change a mapping, merge aliases, create fuzzy synonyms, or convert the color into another color space.
- Click the HEX value to request a clipboard copy. The chart copies only the HEX token, without adding a CSS declaration or changing its capitalization. Success is reported only after the browser resolves the clipboard request.
- Paste the value where it belongs. For a named color, type the keyword without a hash; for a copied HEX value, retain the hash. For example, color: aqua; and background-color: #00ffff; represent the same standardized sRGB value in their respective properties.
- Clear the filter when you want the complete reference again. Doing so restores all 148 opaque named-color rows.
If clipboard permission is denied, the visible keyword, HEX, and RGB text remains selectable for manual copying. The chart reports a successful copy only after the browser resolves the request, so the visible values provide a manual fallback when one-click copying is unavailable.
How the filter handles names and values
The search behavior is intentionally strict for numeric inputs. That prevents a partial channel number from appearing to match an unrelated color and gives you confidence that the displayed mapping is the one you requested.
| Filter input | Matching behavior | Practical result |
|---|---|---|
| Name fragment | Case-insensitive keyword matching | Shows rows whose standardized names contain the entered text |
| #RRGGBB | Exact HEX matching | Shows only rows with that complete six-digit value |
| Complete rgb(...) | Exact full-string matching | Finds the exact RGB mapping rather than a similar channel value |
| Short numeric fragment | Not treated as a complete RGB search | Cannot accidentally match an unrelated channel value |
If nothing matches, the chart displays a no-match message rather than substituting a nearby color. Filtering also preserves the specification table order, which is ASCII alphabetical by keyword in this implementation. Emptying the filter restores the full list without changing any values.
Choosing a name, HEX, or RGB value
There is no single best format for every stylesheet. Choose the representation that fits the job:
- Use a CSS keyword when readability and quick editing matter, such as in a prototype or a small legacy stylesheet.
- Use a six-digit HEX value when you want a compact, standardized token that is independent of the color’s descriptive name.
- Use decimal RGB when the individual red, green, and blue channels need to be visible to a developer or design system.
Preserve an existing keyword when maintaining code, but remember that aliases do not create distinct colors. For a new shared token, your team’s naming and format conventions should decide whether a keyword, HEX, or RGB value is the most consistent choice. The chart supplies exact references; it does not recommend a naming style or merge alias rows.
Keep the property’s purpose in mind as well. A color that works for a large background may be unsuitable for small text, and the same keyword can look different against different backgrounds. The name itself does not establish whether a foreground-background pair is readable.
What a named color does not guarantee
Every color in the chart resolves in the sRGB color space. That makes the HEX and RGB mappings exact within the chart, but it does not turn the reference into a physical-pigment, print, or display-calibration tool. It also does not provide an accessibility rating or guarantee that neighboring names will appear clearly different on every screen.
Accessibility must be evaluated from the actual foreground and background pair, together with text size, weight, and applicable guidance. Use the Color Contrast Checker for that separate decision; a familiar name such as gray or yellow provides no contrast guarantee by itself.
Two CSS keywords are intentionally absent from the 148 opaque rows. transparent is an alpha-bearing keyword representing transparent black rather than an opaque named swatch. currentColor depends on an element’s computed color and therefore has no fixed standalone HEX value. Both may still be used in CSS contexts that accept them, but neither belongs in a table of fixed opaque mappings.
The chart is also a reference, not a gradient builder, palette generator, image sampler, or historical web-safe color generator. Its job is narrower and more precise: identify an opaque CSS named color and show its standardized sRGB values.
A local lookup with clear boundaries
The chart runs entirely in the browser and does not send searches or copied values to a server. Its fixed dataset contains 148 rows, 148 unique keyword keys, lowercase six-digit HEX values, and separate alias rows. That makes it suitable for translating a legacy stylesheet, checking a name’s exact value, finding an alias, choosing a readable prototype color, or copying a stable color token into CSS without guessing.
Related reading: Create Linear or Radial CSS Gradients: Preview and Copy.
Related reading: CSS Checkbox Generator vs Manual CSS: When to Use Each.