Color Converter

Convert colors between HEX, RGB, and HSL formats.

About this tool: Color Converter

Convert colors between HEX, RGB and HSL and see a live preview. Edit any one format and the other two update automatically, ready to copy into your CSS or design tool.

How to use it

  1. Enter a color in HEX, RGB or HSL.
  2. Check the color preview to confirm it looks right.
  3. Read the converted values in the other two formats.
  4. Click the copy button next to the format you need.

Frequently asked questions

What is the difference between HEX, RGB and HSL?
HEX and RGB both describe a color by its red, green and blue amounts. HSL describes it by hue, saturation and lightness, which is often easier to adjust by hand.
Which format should I use in CSS?
All three work in CSS. HEX is the most common and compact, while HSL is convenient for creating lighter or darker variants of a color.
Does it support 3-digit HEX codes?
Yes. Short HEX codes such as #0af are accepted and treated as shorthand for #00aaff.

All Tools