Color Contrast Checker

The Complete Color Contrast Guide

How the WCAG contrast ratio is calculated, what AA and AAA actually require, why contrast matters, and how to pick color pairs that pass.

Open Checker

How the WCAG Contrast Ratio Is Calculated

Contrast ratio compares how bright two colors appear to the eye. Each color is first converted to its relative luminance - a single brightness value that weighs the red, green, and blue channels unevenly, since the human eye perceives green as brighter than red, and red as brighter than blue, for the same intensity.

Once both colors have a luminance value, the ratio is simply the lighter luminance plus a small constant, divided by the darker luminance plus the same constant. The result always falls between 1:1 (identical colors, no contrast at all) and 21:1 (pure black against pure white, the maximum possible contrast).

AA vs AAA Standards

LevelNormal TextLarge Text
WCAG AA4.5:1 minimum3:1 minimum
WCAG AAA7:1 minimum4.5:1 minimum

"Large text" is defined as 18pt (24px) regular weight or larger, or 14pt (18.66px) bold or larger - bigger, bolder shapes stay legible at lower contrast, so the bar is lower. AA is the widely-referenced baseline most sites and many regional accessibility laws target; AAA is a stricter, optional standard that's genuinely harder to hit with vibrant brand colors and is typically reserved for content aimed specifically at users with low vision.

Why Color Contrast Matters

Low visionUsers with reduced visual acuity or age-related vision changes rely on strong contrast just to distinguish text from its background.
Color blindnessColor pairs that rely on hue alone (like red text on a green background) can become nearly indistinguishable for color-blind users unless the underlying brightness also differs.
Bright-light readabilityHigh-contrast text stays legible on phone and tablet screens used outdoors or under glare, where low-contrast text washes out.
Legal complianceMany regions require WCAG AA compliance for public-facing websites and apps under accessibility laws.

Tips for Picking Accessible Color Pairs

Push the brightness apartContrast comes from a brightness gap, not a hue difference - a dark brand color needs a genuinely light background (or vice versa), not just a different color.
Check every text size separatelyA color pair that fails AA for body copy can still pass for a large heading, since large text gets a lower required ratio.
Test against the real backgroundCheck contrast against the actual background a text sits on, including images, gradients, or brand panel colors, not just plain white.
Keep a small set of vetted pairsPre-check your brand's text/background combinations once and reuse only the ones that pass, instead of re-deciding contrast on every new screen.

Frequently Asked Questions

What counts as "large text" under WCAG?

Large text is defined as 18pt (24px) regular weight or larger, or 14pt (18.66px) bold or larger. Large text gets a lower minimum contrast ratio because bigger, bolder shapes remain legible at lower contrast than small body copy.

How is the contrast ratio actually calculated?

Each color's relative luminance (its perceived brightness, accounting for how the eye weights red, green, and blue differently) is calculated, then the lighter luminance plus 0.05 is divided by the darker luminance plus 0.05 to produce a ratio between 1:1 and 21:1.

Does a passing contrast ratio guarantee the colors work for colorblind users?

Not entirely. The WCAG ratio measures brightness difference (luminance), not hue difference, so it's a solid proxy for general readability but was never designed to guarantee two colors are distinguishable for every type of color blindness. Treat a high contrast ratio as a good foundation, and avoid using color alone to convey meaning - pair it with text labels, icons, or patterns too.

Why do WCAG's contrast thresholds differ for normal text and large text?

Larger, bolder character strokes cover more area and their edges are easier for the eye to resolve, so they stay legible at lower contrast than small body text does. That's why WCAG sets the bar lower for large text (3:1 at AA, 4.5:1 at AAA) than for normal text (4.5:1 at AA, 7:1 at AAA) - size does some of the work contrast would otherwise have to do alone.

Is the WCAG 2.x contrast ratio the final word on text legibility?

It's still the official standard AA/AAA compliance is measured against today, but it's a simplified model - it can overrate contrast for some very light or very dark color pairs and underrate it for certain mid-tones. A newer perceptual model called APCA is being explored for a future WCAG 3, but until that work is finalized, the WCAG 2.x ratio this tool calculates remains the number that matters for compliance.

Open Checker