IT

Convert a colour and check its contrast.

Paste HEX, RGB, HSL, OKLCH, CMYK or a CSS name. Get every format, and the WCAG contrast against white, black or a second colour.

Runs in your browser · nothing is uploaded

Loading…

Next step: Paper sizes →

How it works

Three steps.

  1. Paste a colour in any format, or pick one with the colour picker.

  2. Copy the format you need: HEX, RGB, HSL, OKLCH or CMYK.

  3. Check the contrast against white, black or your background colour.

Related tools

One colour, many notations

HEX and RGB describe the same thing: how much red, green and blue light a screen mixes, from 0 to 255. HSL rewrites it as hue, saturation and lightness, which is easier to tweak by hand. OKLCH is a newer CSS format built on how we perceive colour: the same lightness value looks equally light across hues, so it is good for building palettes. Colours outside the sRGB range are clipped to the nearest one, and the tool tells you.

About CMYK

The CMYK values here come from a simple formula with no colour profile. They are a rough starting point, not what your printer will produce: real CMYK depends on paper, inks and the press profile. Don't use them for print proofing; ask your print shop for their profile.

Contrast and WCAG

The contrast ratio goes from 1:1 (same colour) to 21:1 (black on white). WCAG level AA asks for at least 4.5:1 for body text and 3:1 for large text (about 24 px, or 19 px bold). Level AAA asks for 7:1 and 4.5:1. Mid-tone brand colours like orange often pass only for large text on white, so check headings and buttons separately from body copy.

FAQ

Questions.

How do I convert HEX to RGB?

Split the six digits into three pairs and read each pair as a base-16 number: #E84818 is 232, 72, 24.

What contrast ratio do I need for accessible text?

At least 4.5:1 for normal text and 3:1 for large text to meet WCAG AA. AAA needs 7:1 and 4.5:1.

Can I use these CMYK values for printing?

Only as a rough guide. Accurate CMYK needs the colour profile of your printer and paper.