Color Converter: HEX to RGB, HSL and CMYK
Convert colors between HEX, RGB, HSL and CMYK. Type a value in any format or pick a color, and every other format updates instantly, along with contrast checks against white and black text.
Click the color swatch to open a color picker, or type a value such as #ff8800, rgb(255, 136, 0), rgb(100% 50% 0%) or hsl(0.5turn 100% 50%).
CMYK values are a simple mathematical conversion, not a print profile. The exact CMYK values for a print job depend on the printer's profile and paper, and only the print shop can give them.
Color formats explained
Swipe the table sideways to see all columns.
| Format | Example | Used in |
|---|---|---|
| HEX | #4338ca | Web pages, CSS, design tools |
| RGB | rgb(67, 56, 202) | Screens, CSS, image editors |
| HSL | hsl(245, 58%, 51%) | CSS, making lighter or darker shades |
| CMYK | cmyk(67%, 72%, 0%, 21%) | Printing |
HEX and RGB describe the same thing: how much red, green and blue light a screen should mix, from 0 to 255 each. HSL describes a color by its hue on the color wheel (0 to 360 degrees), its saturation and its lightness, which makes it easy to create a darker or lighter version of a brand color by changing only the last number.
What does the contrast ratio mean?
The contrast ratio compares how bright two colors are, from 1:1 (no contrast) to 21:1 (black on white). The Web Content Accessibility Guidelines (WCAG) ask for at least 4.5:1 for normal text and 3:1 for large text, so that people with low vision can read it. The boxes above show the ratio of your color with white and with black text.
Once you have the HEX code of a brand color, you can use it in the QR code generator to make codes in your own colors.
Frequently asked questions
Can I enter three-digit HEX codes?
Yes. Short codes such as #f80 expand to #ff8800. The # sign is optional.
Why does the CMYK value differ from my design software?
Design software converts using a color profile for a specific printer and paper. This tool uses the plain formula without a profile, which is fine for a rough idea but not for final print files.
Does it support transparency?
Not at the moment. Alpha values in eight-digit HEX codes or rgba() are ignored and the color is shown fully opaque.