Skip to content

How Contrast Checker works

Pick two colors to see their WCAG 2.1 contrast ratio along with pass and fail results for AA and AAA at normal and large sizes. If the pair fails, get a suggested foreground that passes.

Calculates the contrast ratio using the WCAG 2.1 relative luminance algorithm and walks the HSL lightness axis to find the nearest compliant foreground.

Questions

What is a passing contrast ratio?
WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA is stricter: 7:1 for normal and 4.5:1 for large.
How is "large text" defined?
WCAG defines large text as 18pt (24px) regular or 14pt (18.66px) bold or larger.
How does the suggestion feature work?
The tool keeps the background unchanged and walks the foreground's lightness axis in HSL until the contrast ratio meets AA normal.
Can I enter rgb() or hsl() values?
Yes. The text input accepts hex, rgb(), hsl(), and common CSS named colors.

More Generate tools

All the tools · How to check that nothing is sent

WCAG Contrast Checker | Only in the Tab