Skip to main content

Contrast Checker

Check text and background colours against WCAG 2.2 and get the nearest colours that pass.

Colours

Picker edits

WCAG 2.2

Large text, 24px

Body text at 16px reads like this.

Button
Contrast ratio
5.63:1
CheckAAAAA
Normal text ≥ 4.5:1PassFail
Large text ≥ 3:1PassPass
UI and graphics ≥ 3:1PassNo AAA level

Nearest passing colours

Each keeps the hue and saturation and moves lightness only. Pick one to use it.

  • Text for AAAlready passes
  • Text for AAA#4e5567 · 7.07:1
  • Background for AAAlready passes
  • Background for AAANo lightness reaches it

Runs in your browser; nothing you enter leaves this page.

How it works

The ratio

The tool computes the contrast ratio between the two colours from their relative luminance, from 1:1 (identical) up to 21:1 (black on white), and compares it with the WCAG 2.2 thresholds.

ratio = (L_lighter + 0.05) ÷ (L_darker + 0.05)

What counts as a pass

Normal text needs 4.5:1 for AA and 7:1 for AAA. Large text needs 3:1 for AA and 4.5:1 for AAA. User-interface parts and graphics need 3:1.

When a pair fails, the tool offers the nearest colours that pass. Each keeps hue and saturation and moves only lightness, so the result stays recognisably your colour.

More tools

All 238 tools