Contrast Checker
IYour colours
Codes can be hex, rgb() or hsl(), in any order, separated however you like. Hover a swatch to take it out.
IIEvery pairing
Seen by
Show
Each square is a row's colour as text on a column's colour as background. Click one for a closer look.
IIIUp close
A heading in this pair
Body text at a normal reading size. If this is hard to read here, it'll be harder on a phone in the sun.
Small print, like a caption or a footnote, needs the most contrast of all. A buttonIIITake it with you
How does this work?
- Everything happens in your browser. The link only carries the colour codes.
- Contrast is worked out the way the web's accessibility guidelines (WCAG 2) do it: how much light each colour gives off, compared as a ratio from 1:1 (the same) to 21:1 (black on white).
- AA, the usual bar: 4.5:1 for body text, 3:1 for large text (about 24px, or 19px bold) and for icons and buttons.
- AAA, the stricter bar: 7:1 for body text, 4.5:1 for large text.
- "Seen by" redraws every colour as it looks with each common kind of colour blindness, using the Machado model, and scores the pairs again, so you can see which pairs only work because of hue.
- A fix keeps the text colour's hue and only makes it lighter or darker, by the least it takes to reach the bar.