CSS named colors to hex
The CSS named color keywords (red, dodgerblue, papayawhip, etc) and their hex equivalents. Worked example with a popular pick.
# conversion
| format | foreground | background |
|---|---|---|
| named | dodgerblue | papayawhip |
| hex | #1e90ff | #ffefd5 |
| rgb | rgb(30, 144, 255) | rgb(255, 239, 213) |
# context
CSS supports 147 named colors. Most are obscure; a handful (red, white, black, transparent, currentColor) cover 95% of use. The named values map to fixed hex codes — convert one and you get a reproducible color in any tool.
→ Open in color picker (pre-filled)
# notes
- Browsers resolve `color: red` to `rgb(255, 0, 0)` aka `#ff0000`.
- The full keyword list is in the CSS Color spec — coolors.co and other tools mirror it.
- Named colors do not support alpha. Use hex8 or rgba() if you need transparency.