Accessibility

Color Contrast Checker

Check the exact contrast ratio between any two colors and see whether they pass WCAG 2.2 AA or AAA for normal text, large text and UI components. Includes suggested alternatives that pass — so you can fix accessibility in seconds.

Colors

Try a preset:

12.63:1
AAA — enhanced
Large headline preview
Normal text preview — this is how body copy appears.
Small print — captions and legal text.

What is contrast ratio?

Contrast ratio measures the difference in perceived lightness between two colors. It's expressed as a ratio from 1:1 (identical colors, no contrast) to 21:1 (pure black on pure white, maximum contrast). The formula is defined by the W3C in WCAG and is the same across WCAG 2.0, 2.1 and 2.2:

ratio = (L1 + 0.05) / (L2 + 0.05)

where L1 is the relative luminance of the lighter color and L2 the darker.

WCAG 2.2 contrast requirements

CriterionLevelRequirementApplies to
1.4.3AA4.5:1Normal text
1.4.3AA3:1Large text (≥18pt, or ≥14pt bold)
1.4.6AAA7:1Normal text
1.4.6AAA4.5:1Large text
1.4.11AA3:1UI components and graphical objects

Why contrast matters

Around 8% of men and 0.5% of women have some form of color vision deficiency (source: NIH/NEI, not to be quoted without verification). Poor contrast also affects users with low vision, older users, anyone using a screen in bright sunlight, and users on cheap displays. Accessible contrast benefits everyone, not just people with disabilities.

Common contrast mistakes

  • Light gray on white — placeholder text and disabled labels often fall below 3:1. Prefer a darker gray.
  • Brand color as text on white — many brand colors look vibrant but fail at 4.5:1. Use a dark shade of the brand color for text.
  • Colored buttons with white text — always check; some yellows and greens fail even at 3:1.
  • Icons in pale gray — icon contrast needs 3:1 against its background, and often fails.

FAQ

What is the WCAG minimum contrast ratio?
WCAG 2.2 Level AA requires 4.5:1 for normal text and 3:1 for large text. Level AAA requires 7:1 and 4.5:1. UI components require 3:1 at Level AA.
How is contrast ratio calculated?
ratio = (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are relative luminances of the two colors.
Does the tool suggest alternatives?
Yes — when the pair fails AA, the tool suggests progressively darker versions of the foreground color that pass 4.5:1, shown as clickable swatches.
Are WCAG ratios still important in WCAG 2.2?
Yes. WCAG 2.2 retains the same contrast requirements (1.4.3, 1.4.6 and 1.4.11) that existed in 2.1, with additional new criteria like 2.4.11 and 3.2.6 added elsewhere.
Is the tool free?
Yes. Free, no signup, all processing in your browser.

Related tools

Related articles