Color Contrast Checker (WCAG)

Enter a text colour and a background colour to see the contrast ratio and whether it passes WCAG 2.2 for normal text, large text and interface components. If it fails, the tool suggests the closest colour that passes.

  • Free, no account needed
  • Checked by 12 test cases
  • Runs in your browser: nothing you enter is sent to us
  • Updated November 19, 2026

Large text sample (24 px)

Normal text sample at 16 pixels for reading.

Contrast ratio
—

How to use this tool

  1. Enter or pick the text and background colours.
  2. Read the ratio and the pass or fail results.
  3. Use the suggested colour if it fails.

How it works

Contrast ratio = (L1 + 0.05) ÷ (L2 + 0.05), where L is the relative luminance defined by WCAG 2.2 for sRGB. Thresholds: 4.5:1 normal text AA, 3:1 large text AA (18.66 px bold or 24 px), 7:1 and 4.5:1 for AAA, 3:1 for UI components and graphics (WCAG 1.4.11). Transparent colours are blended over the background first. Suggestions adjust lightness only, keeping hue and saturation.

Limitations

  • Contrast is one part of readability; font size, weight and colour blindness also matter.

Privacy and data

Everything happens in your browser. Nothing you enter is sent to our server.