What ratio does WCAG AA need for text?
WCAG 2.2 level AA asks for at least 4.5:1 between normal text and its background. Large text, which is about 24px regular or 18.66px bold, needs at least 3:1.
To fix a color contrast failure, darken or lighten the text or background color until the pair reaches the WCAG ratio you need: 4.5:1 for AA normal text, 3:1 for AA large text, or 7:1 for AAA. This tool suggests the nearest passing color so the original hue stays recognisable.
Enter a text color and background color, choose AA or AAA, then adjust either color until the pair passes the WCAG contrast threshold. Copy the passing hex or CSS values when it does.
Enter a six-digit hex color.
Enter a six-digit hex color.
Pick the level and text size, then adjust either color until the pair passes.
WCAG level
Text size
Target AA normal text needs 4.5:1 — Pass at 17.74:1
Text #111827
Background #ffffff
--foreground: #111827;
--background: #ffffff;
Normal text preview — The quick brown fox jumps over the lazy dog.
Large text preview — Aa 123
Contrast ratio: 17.74:1
A ratio runs from 1:1 for two identical colors to 21:1 for black on white. The table shows the minimum ratio for each level and text size.
| Text size | AA | AAA |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text | 3:1 | 4.5:1 |
Large text is at least 18 point regular or 14 point bold, roughly 24px regular or 18.66px bold in CSS pixels. Anything smaller uses the normal text thresholds. These figures come from the W3C contrast minimum guidance.
Start from a color pair you already like, then use the target controls to nudge only as far as the pass mark. You can also open a pair in the WCAG color contrast checker, build a palette from one brand color with the accessible color palette generator, browse accessible website color palettes, or explore all website color palettes for starting points.
WCAG 2.2 level AA asks for at least 4.5:1 between normal text and its background. Large text, which is about 24px regular or 18.66px bold, needs at least 3:1.
Level AAA raises the minimum to 7:1 for normal text and 4.5:1 for large text. Choose AAA in the fixer above when the text must meet the stricter level.
Either works, because contrast is measured between the two colors. Change the text color to keep a branded background, or change the background to keep a branded text color. Use Adjust both colors when one change alone cannot reach the target.
No. Contrast is one requirement. Also check hover, focus and disabled states, text over images, readable font sizes, keyboard access and alternative text across the page.