1. Home
  2. WCAG contrast

WCAG colour contrast checker

Enter a text and background colour and the calculator shows the contrast ratio and AA/AAA compliance.

Contrast ratio
—
AA · normal text (4.5:1)—
AA · large text (3:1)—
AAA · normal text (7:1)—
AAA · large text (4.5:1)—
UI components (3:1)—

This is how a paragraph looks in the chosen colours.

The quick brown fox jumps over the lazy dog, while «Щасливий Їжак» reads along.

What the calculator computes

The contrast ratio is calculated with the WCAG formula from the relative luminance of two colours, from 1:1 (identical) to 21:1 (black on white). The result is compared with thresholds: normal text at level AA needs at least 4.5:1, large text and interface components 3:1, and level AAA 7:1 and 4.5:1 respectively.

What counts as large text

In WCAG, large text is roughly 24 px at regular weight or roughly 18.66 px bold and above. Smaller text is judged against the stricter threshold.

The nearest-colour hint

If the ratio is below 4.5:1, the calculator adjusts the lightness of the text colour in small steps until it reaches AA. Treat it as a starting point and check the result in the real design and in dark mode.

Contrast is not the only condition for readability. Thin strokes, tiny sizes and translucent layers can hurt reading even when the ratio passes.