What a contrast ratio actually measures
Contrast ratio is a single number that tells you how different two colors are in brightness — specifically, how readable text in one color is over a background of the other. It runs from 1:1, where the two colors are identical and the text is invisible, up to 21:1, which is pure black on pure white.
The number is not based on how different the hues look but on relative luminance, a weighted measure of how much light each color sends to your eye. Green contributes the most to perceived brightness, red less, and blue the least, which is why two colors that feel very different can still fail if their luminance is too close.
The WCAG levels in plain English
The Web Content Accessibility Guidelines (WCAG 2.1, from the W3C) set the targets most accessibility laws and design systems reference. There are two levels — AA is the common baseline, AAA is the stricter goal — and the bar changes depending on text size:
- AA, normal text: at least 4.5:1. This is the level you should aim to clear for ordinary body copy.
- AA, large text: at least 3:1. Large text is roughly 24px and up, or 18.66px and up if it is bold.
- AAA, normal text: at least 7:1 — a high bar that is great for long reading or low-vision audiences.
- AAA, large text: at least 4.5:1.
Why large text gets an easier pass
It might seem odd that big text is allowed lower contrast, but it makes sense: thicker, larger letterforms have more pixels doing the work, so the eye can read them comfortably even when the brightness difference is smaller. Thin, small text has far less to grab onto, so it needs the extra contrast to stay legible.
This is why the same color pair can pass for a headline but fail for fine print. When you check a combination, always think about the smallest, lightest-weight text it will be used for, not just the big, bold version that looks fine.
How to fix a pairing that fails
When a combination comes up short, you usually do not need to throw out your colors — you just need to push them apart in luminance. Darkening the text or lightening the background (or both) raises the ratio without necessarily changing the hue you picked.
When this checker finds a failing pair, it suggests the nearest color that clears the AA bar, so you can keep your design intent while landing on something readable. Apply it, eyeball it, and adjust from there. Often a small shift is all it takes to go from failing to comfortably passing.
Why any of this is worth the effort
Roughly one in twelve men and a smaller share of women have some form of color vision deficiency, and far more people deal with glare, aging eyes, cheap screens, or simply reading on a phone in bright sunlight. Good contrast helps every one of them, not just users with diagnosed impairments.
On top of the accessibility win, readable text keeps people on your page longer and is increasingly expected by procurement rules and platform guidelines. Checking contrast takes seconds and quietly improves the experience for everyone who visits.