Color Contrast Checker

Check WCAG color contrast ratio for accessibility compliance.

Check whether text is readable against its background using the WCAG contrast ratio, from 1:1 (no contrast) to 21:1 (black on white). Enter a text colour and a background colour in any format, and see whether they pass AA and AAA for normal text, large text and user-interface parts. AA needs 4.5:1 for normal text and 3:1 for large text and UI components; AAA needs 7:1 and 4.5:1. A preview shows the colours together, and you can swap them with one click.

Large heading text

Normal body text should be easy to read for everyone, including people with low vision.

Small print and captions need even more contrast.

Contrast ratio
4.83:1

from 1:1 to 21:1

Normal text
AA
Large text
AAA
Normal text, AAneeds 4.5:1Pass
Normal text, AAAneeds 7:1Fail
Large text (24px, or 19px bold), AAneeds 3:1Pass
Large text, AAAneeds 4.5:1Pass
UI components & graphics, AAneeds 3:1Pass

Ratios follow WCAG 2.2 (relative luminance of sRGB colors). The ratio is shown truncated to two decimals; pass or fail uses the exact value.

Common use cases

  • Check website colours meet WCAG accessibility guidelines
  • Choose a readable text colour for a brand background
  • Test button and icon colours against their background
  • Fix low-contrast text flagged by an accessibility audit

How to use

  1. Enter the text colour and the background colour as HEX, RGB, HSL or a colour name.
  2. Read the contrast ratio and the pass or fail results.
  3. Swap the colours to check the reverse.
  4. Adjust a colour until it passes the level you need.

FAQ

What contrast ratio do I need?

For WCAG level AA: 4.5:1 for normal text, and 3:1 for large text and for user-interface components and graphics. For AAA: 7:1 for normal text and 4.5:1 for large text.

What counts as large text?

In WCAG, large text is at least 18 point (24 CSS pixels), or 14 point (about 19 pixels) if bold.

How is the contrast ratio calculated?

From the relative luminance of the two colours: (lighter + 0.05) ÷ (darker + 0.05). Luminance weights green most and blue least, matching how bright colours look to people.