Color contrast checker (WCAG 2.2)

Enter a text color and a background color to get the contrast ratio and a pass or fail result for WCAG 2.2 AA and AAA, for normal text and large text.

  • Free
  • No sign-up
  • Runs in your browser
HEX, rgb() or hsl()
HEX, rgb() or hsl()
Normal text sample: the quick brown fox jumps over the lazy dog.
Large text sample
7.06 : 1
#4F33E8 / #FFFFFF
Text typeLevelNeedsResult
Normal textAA4.5 : 1✓ Pass
Large textAA3 : 1✓ Pass
Normal textAAA7 : 1✓ Pass
Large textAAA4.5 : 1✓ Pass
Interface components and graphicsAA3 : 1✓ Pass

Large text means at least 24 px (18 pt) regular, or 18.66 px (14 pt) bold. Ratios are truncated, not rounded up, as WCAG requires. Source: WCAG 2.2.

Runs in your browser — nothing you enter is sent to our servers.

How to use Contrast Checker

  1. Enter the text color and the background color, with the pickers or as HEX, rgb() or hsl() values.
  2. Read the contrast ratio and look at the preview with normal and large sample text.
  3. Check the table: each row shows the required ratio and whether your colors pass, or use Swap colors to test the reverse.

Features

  • Contrast ratio from 1:1 to 21:1, using the WCAG 2.2 formula
  • AA and AAA results for normal text and for large text
  • Result for user interface components and graphics (3:1)
  • Live preview with normal and large sample text
  • Swap button, and semi-transparent text colors are blended over the background

Examples

InputResult
Text #000000 on background #FFFFFF21 : 1. Passes AA and AAA for normal and large text.
Text #4F33E8 on background #FFFFFF7.06 : 1. Passes AA and AAA for normal and large text.
Text #777777 on background #FFFFFF4.47 : 1. Fails AA for normal text (needs 4.5 : 1); passes AA for large text.

Limitations

  • The checker measures the two colors you enter; it cannot judge text over images or gradients, font weight and thickness, or how the text looks to people with low vision. Logos and purely decorative text are exempt from WCAG contrast rules. Ratios are truncated to two decimals, not rounded up, because WCAG requires the full threshold to be met.

Learn more

Text that is hard to read on its background excludes people with low vision, color-vision deficiencies or simply a bright screen in sunlight. The Web Content Accessibility Guidelines (WCAG) set minimum contrast ratios so that most people can read text comfortably, and many laws and procurement rules refer to them.

The ratio compares the relative luminance of two colors, a number between 0 for black and 1 for white computed from the linear red, green and blue values. The ratio runs from 1:1, identical colors, to 21:1, black on white. Level AA asks for 4.5:1 for normal text and 3:1 for large text; level AAA asks for 7:1 and 4.5:1. Passing is necessary but not the whole story: font size, weight, spacing and the surrounding design all affect readability. Use this tool to test the pairs in your design system early, before the colors are everywhere.

Frequently asked questions

What contrast ratio does WCAG require?

For level AA, normal text needs at least 4.5:1 and large text at least 3:1. For level AAA, normal text needs 7:1 and large text 4.5:1. User interface components and graphics need 3:1.

What counts as large text?

At least 18 point (24 px) in regular weight, or at least 14 point (about 18.66 px) in bold.

Why does 4.499:1 fail even though it looks like 4.5:1?

WCAG says the ratio must not be rounded up. A result just below the threshold does not pass, so the tool truncates the displayed figure to two decimals.

How is the contrast ratio calculated?

Each color gets a relative luminance from its linearized red, green and blue values. The ratio is (lighter luminance + 0.05) divided by (darker luminance + 0.05).

Sources

Last reviewed: September 30, 2026