What is Color Contrast Checker?
Enter the text and background colours (pickers or hex) to get the contrast ratio and AA/AAA verdicts: normal text needs 4.5 (AA) or 7 (AAA), large text 3 / 4.5.
One click walks the text colour towards black or white until AA for normal text passes.
Worked example: grey text that narrowly misses AA
Choose “Muted text” to compare #777777 with #ffffff. The ratio is about 4.48:1: large text passes AA, but normal text does not. The verdict uses the full calculated ratio, not the rounded two-decimal display.
Choose “Darker text” to change the foreground to #767676. Its ratio is about 4.54:1, which passes normal-text AA but not AAA. “Fix to AA” also searches towards black or white while holding the background fixed; it does not guarantee the smallest colour change or a match to your brand palette.
| Text / background | Ratio | Normal AA | Normal AAA |
|---|---|---|---|
| #777777 / #ffffff | 4.48:1 | Fail | Fail |
| #767676 / #ffffff | 4.54:1 | Pass | Fail |
| #ffffff / #1e293b | 14.63:1 | Pass | Pass |
Read the four WCAG text verdicts
This checker uses WCAG 2.2 contrast ratios for text, computed from sRGB relative luminance. The ratio is (lighter luminance + 0.05) / (darker luminance + 0.05), ranging from 1:1 for identical colours to 21:1 for black and white.
Large text means at least 18pt (24 CSS px) at normal weight, or 14pt (about 18.667 CSS px) when bold. Visual size, font choice and thin strokes still affect readability. A near-threshold colour deserves extra margin rather than rounding a failing value up to a pass.
| Text size | AA minimum | AAA minimum |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text | 3:1 | 4.5:1 |
What this colour-pair check does not cover
Inputs accept opaque three- or six-digit hexadecimal colours. Transparent text, images, gradients and overlays need their actual composited colours checked at the text location. For text crossing a gradient, checking only its two endpoints can miss a worse contrast in the middle.
Passing this pair is not a full accessibility audit. Check actual font size and weight, hover and focus states, links, icons, focus indicators and colour-only instructions separately. Non-text components have their own requirements; these four badges are for text.
Invalid input leaves the last valid result visible with an error message. Correct both colours before using the verdict. Swapping colours preserves the ratio but changes the preview, which is useful for considering a light or dark design.
Frequently asked questions
What counts as large text?
WCAG defines large text as 18pt (24px) regular, or 14pt (18.66px) bold and above.
References and example checks
Examples checked against this tool: .