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.





