Elements must meet minimum color contrast ratio thresholds
How to fix the color-contrast accessibility rule. Colour and contrast.
What this rule checks
Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
Who is affected
Text without enough contrast against its background is hard or impossible to read for people with low vision, colour blindness, or anyone on a phone in sunlight.
How to fix it
Darken the text (or lighten the background) until the ratio reaches 4.5:1 for normal text or 3:1 for large text. The suggested colour below is the closest one that passes.
Try colours in the contrast checker: it shows the ratio and suggests the closest colour that passes.
WCAG success criteria
When this rule fails, the page fails:
- 1.4.3 Contrast (Minimum) (Level AA, WCAG 2.0, 2.1, 2.2)
Find it on your own page
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.
More detail
- Deque University’s reference for color-contrast (the makers of axe-core, the engine our scanner uses)
- All fix guides