Skip to content
toolgrid

No tool found. Try another word.

Color Contrast Checker

Check the contrast ratio of text and background colors against WCAG AA and AAA, and get the closest color that passes.

Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.

How to use the Color Contrast Checker

  1. 1 Enter the text color and the background color.
  2. 2 Read the contrast ratio and the pass or fail results.
  3. 3 If it fails, click the suggested color to use it.

About the Color Contrast Checker

The contrast ratio compares the relative luminance of two colors, from 1:1 (no contrast) to 21:1 (black on white). It is calculated with the formula from WCAG 2: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color.

WCAG level AA asks for at least 4.5:1 for normal text and 3:1 for large text (24 px, or 18.7 px bold) and for icons and form controls. Level AAA asks for 7:1 and 4.5:1. The ratio is not rounded before comparing, as WCAG requires.

When a pair fails AA, the tool searches for the text color with the smallest change in lightness that reaches 4.5:1, so your design stays as close as possible to the original.

Frequently asked questions

What contrast ratio do I need?

At least 4.5:1 for body text to meet WCAG AA, 3:1 for large text and UI components.

What counts as large text?

At least 24 px (18 pt) regular, or 18.7 px (14 pt) bold.

Does the ratio depend on which color is the text?

No, the ratio is the same either way, but the suggestion changes the text color.

Does this check APCA?

No, it uses the WCAG 2.x formula, which is what accessibility laws currently refer to.