Color Converter: Switch Between CSS Color Formats

Convert colors between HEX, RGB, and HSL with a live preview.

Frequently asked questions

Which color formats are supported?

HEX (#rrggbb), RGB (rgb(r, g, b)), and HSL (hsl(h, s%, l%)).

Can I pick a color visually instead of typing values?

Yes, use the color picker swatch and all three formats update automatically.

Can I convert a three-digit or eight-digit HEX code?

No. Only six-digit HEX is accepted, so the shorthand and the form with an alpha pair are rejected with a message. Write out the full six digits first.

Does it support transparency (alpha)?

No. If you type rgba(...) the alpha value is ignored and only the first three numbers are used, so the result is always opaque.

How do I make a color lighter or darker?

Enter the color, then raise or lower the last number in the HSL field. Higher lightness is paler, 100 is white and 0 is black. The HEX and RGB fields follow.

Does letter case matter in HEX codes?

No. #FF5733 and #ff5733 are the same, and the # is optional. When the tool writes a HEX value itself it uses lowercase.