Synchronize colors between normalized hex, RGB, and HSL representations locally.
Loading tool
About Color Converter
Convert a color between HEX, RGB, HSL, HWB, CMYK and CSS named colors. Editing any field, the color picker or the alpha slider updates every other format. The output also shows the nearest CSS color name, relative luminance and the WCAG contrast ratio against white and black text.
Common uses
- Turn a hex code from a design file into rgb() or hsl() for CSS
- Find the closest CSS named color for a hex value
- Check whether white or black text is more readable on a background color
- Convert a color with transparency to an 8-digit hex value
FAQ
- How do I convert HEX to RGB?
- Split the 6-digit hex code into three pairs and convert each pair from base 16 to decimal. For example, #1EA54C becomes rgb(30 165 76). Short 3-digit codes like #F80 are expanded by doubling each digit first.
- Does it support alpha transparency?
- Yes. Alpha is supported in HEX (4 and 8 digit forms), rgb(), hsl() and hwb(). CMYK has no alpha channel, so transparency is not represented there.
- Why is the CMYK value only approximate?
- The tool uses the simple mathematical RGB to CMYK formula without an ICC color profile. Real print output depends on the printer, inks and paper, so use a profile-aware design tool for production print work.
- What contrast ratio is considered accessible?
- WCAG 2 level AA requires at least 4.5:1 for normal body text and 3:1 for large text. Level AAA raises those to 7:1 and 4.5:1.