Web & Accessibility

Colour Contrast Checker

Check a text and background colour against WCAG AA and AAA contrast ratios.

Colours

What the ratio means

Contrast ratio runs from 1:1 (identical) to 21:1 (black on white). WCAG sets minimums so text stays readable for people with low vision. The threshold depends on text size — large text is 18.66px bold or 24px regular and up.

  • AA — 4.5:1 for normal text, 3:1 for large text. The common legal/compliance baseline.
  • AAA — 7:1 normal, 4.5:1 large. Enhanced; aim for it on body copy where you can.
  • UI components & graphics — 3:1 for borders, icons, form outlines and focus indicators (WCAG 1.4.11).

How it's calculated

Each colour's relative luminance is computed by linearising its sRGB channels and weighting them for human vision, then the ratio is (L_lighter + 0.05) / (L_darker + 0.05). It's independent of which colour is text and which is background, so swapping them gives the same ratio — the preview shows both arrangements of your two colours.

These calculators run entirely in your browser — nothing you type is sent anywhere. Results are estimates for planning; validate against your vendor's documentation before you buy or deploy.