Skip to content
ToolsOnDuty - free online tools
Converters

Color Name Converter

Convert CSS color names to HEX and HEX to the nearest name.

Free foreverRuns in your browserNo sign-up

Enter a CSS color name to get its HEX, or a HEX value to find the closest CSS color name.

#4169e1

Name: royalblue

Color nameroyalblue
HEX#4169e1

About the Color Name Converter

Convert a CSS color name into its HEX value, or a HEX value into the closest matching CSS color name.

Covers all 147 standard CSS named colors, with a live swatch so you can see the result.

Handy for CSS, design handoffs and turning a hex value into a memorable name.

Key features

  • Name to HEX and HEX to nearest name
  • All 147 standard CSS color names
  • Live color swatch preview
  • Copy the result instantly

How to use

  1. 1Enter a CSS color name or a HEX value.
  2. 2Read the matching name and HEX with a swatch.
  3. 3Copy the value you need in one click.

Examples

Name to HEX
Input: royalblue
Output: #4169e1

The CSS color name is looked up to its exact HEX value.

HEX to nearest name
Input: #4169e2
Output: royalblue (nearest)

A HEX with no exact name maps to the closest CSS color.

Frequently asked questions

What if the HEX has no exact name?
The closest CSS color name by color distance is shown, and it is labelled as the nearest name rather than an exact match.
Which color names are supported?
All 147 standard CSS named colors, such as royalblue, tomato, teal and rebeccapurple.
Is my color data uploaded?
No. The conversion runs entirely in your browser.