Contrast Checker

Check if text and background colors are readable. Shows WCAG AA and AAA results and suggests a fix.

How it works

Measures the contrast ratio between text and background by the WCAG formula and tells you if it passes AA and AAA for normal text, large text and UI parts. If it fails, it suggests the closest passing text colour, or a background change. See-through colours are mixed with what is behind them before measuring.

The formula

ratio = (L1 + 0.05) / (L2 + 0.05)   where L is the relative luminance, L1 the lighter

Worked example

Black on white is 21:1, the maximum. Grey #777777 on white is about 4.48:1, which just misses the 4.5 needed for normal text.

Good to know

Common questions

Is 4.5:1 a legal requirement?
It is the WCAG AA level that most accessibility rules and policies refer to. Check the rules that apply to your project.
Why is my ratio different on another site?
Some tools round or use a different method such as APCA. This one uses the WCAG 2 formula.
What about text on an image?
Test against the darkest and lightest parts of the picture under the text.

More in Design.