Skip to content

Color contrast checker

Enter a text color and a background color to see the contrast ratio and which WCAG levels pass.

Large text looks like this

Normal body text at 16px. The quick brown fox jumps over the lazy dog.

Button outline
Contrast ratio
6.03:1
UseLevelNeedsResult
Normal text AA 4.5:1 Pass
Normal text AAA 7:1 Fail
Large text AA 3:1 Pass
Large text AAA 4.5:1 Pass
UI components & icons AA 3:1 Pass

Runs entirely in your browser. Your files and colors never leave your device.

How to use the contrast checker

  1. Type or pick a text color and a background color (HEX, RGB, HSL or a color name).
  2. Read the ratio and the pass/fail results for normal text, large text and UI components.
  3. If a level fails, click “Use suggested color” to get the closest color that passes.
  4. Share the result: the URL keeps both colors.

How it works

The ratio follows WCAG 2.2: (L1 + 0.05) / (L2 + 0.05), where L is the relative luminance of the lighter and darker color. AA needs 4.5:1 for normal text and 3:1 for large text (18pt, or 14pt bold) and UI components; AAA needs 7:1 and 4.5:1. Ratios are compared unrounded, so 4.49:1 fails AA. Suggestions keep the hue and change only lightness, searched in OKLCH.

Try it with popular colors

Related tools