Skip to content
toolbelt
Back to Guides

Passing WCAG Contrast Without Redesigning

By ·

Updated

Your brand colour fails AA and the designer will not change it. Here is how to find the smallest shift that passes.

What is this tool?

Contrast ratio measures the luminance difference between text and its background, from 1:1 to 21:1. WCAG asks for 4.5:1 for normal text and 3:1 for large text.

How it works

I compute relative luminance using the WCAG formula, which accounts for how the eye perceives brightness rather than using raw RGB values, then report the ratio and pass or fail for each level.

Example

#777777 on #FFFFFF → 4.48:1  (fails AA by a hair)
#767676 on #FFFFFF → 4.54:1  (passes)

Two hex digits darker, and it passes.

When to use it

Every colour decision that involves text. Cheapest at design time; most expensive after an accessibility audit.

Optimization Tips

Move lightness, not hue, when you need to pass. Nudging a colour darker preserves the brand recognition that changing the hue would destroy. And test the state variants — the hover colour often fails even when the base passes.

Frequently Asked Questions

What is "large text"?
18pt regular or 14pt bold. Those get a lower 3:1 threshold.
Does AA cover everything?
No. AA is the common legal baseline; AAA is stricter and rarely achievable with brand colours.
Why does an "accessible" palette still fail here?
Because contrast depends on the pair, not the colour alone. A mid grey is fine on white and terrible on black.
Should I worry about dark mode?
Yes. The same pair rarely passes in both modes, so check each separately.

Ready to try it out?

Put this knowledge into practice with our free tool.

Go to Tool

Related tools