HTML Color Name Converter

Convert between color names, HEX, and RGB

Enter Color
Results
Click "Convert" to see results

What is HTML Color Name Conversion?

HTML and CSS support 147 named colors (e.g., "red", "dodgerblue", "lightcoral"). These names are convenient, but sometimes you need their HEX or RGB equivalents for design consistency or programming. This tool converts any valid color name to its HEX and RGB values. It also accepts HEX or RGB input and returns the closest named color (if available).

Color conversion is essential for web designers, developers, and anyone working with CSS. This tool also displays a live color preview, so you can see the color immediately.

All processing is local; no data is sent to any server.

How to Use

Step 1: Enter a color in any recognized format: name (e.g., "tomato"), HEX (e.g., "#FF6347"), or RGB (e.g., "rgb(255,99,71)").
Step 2: Click "Convert". The tool will display the color's HEX, RGB, and the closest named color (if the input was HEX/RGB).
Step 3: A color preview will appear below.
Step 4: Copy the result using the "Copy Result" button.

The tool includes all 147 standard HTML/CSS color names, plus some common variations.

Examples

Input: "dodgerblue" → Output: #1E90FF, rgb(30,144,255)
Input: "#FF4500" → Output: OrangeRed (closest), #FF4500, rgb(255,69,0)
Input: "rgb(255, 20, 147)" → Output: DeepPink (closest), #FF1493, rgb(255,20,147)

Who Uses Color Name Converters?

  • Web Designers – ensuring consistency between named colors and hex values.
  • Front-End Developers – converting design tokens.
  • UI/UX Designers – exploring color palettes.
  • Students – learning color systems.

Pro Tips

  • The tool returns the closest named color based on Euclidean distance in RGB space. It's approximate but useful.
  • Use HEX values for precise color matching across devices.
  • Named colors are convenient for prototyping; for production, use HEX or RGB for consistency.
  • The color preview helps you verify the color before copying.

Frequently Asked Questions

How many named colors are supported?
All 147 standard HTML/CSS color names, plus common aliases like "lightgrey".
What if the color name is not recognized?
The tool will show an error. You can try entering HEX or RGB instead.
Can I convert HEX to the exact named color?
If the HEX matches a named color exactly, it will be returned. Otherwise, the closest named color is shown.
Why is the closest color sometimes different from what I expect?
Because the tool uses a mathematical distance formula. It may not always match human perception, but it's generally close.
Is my data sent to a server?
No, all processing is local.
Can I convert HSL colors?
Not directly; please convert HSL to RGB/HEX first using another tool.