A designer hands you a palette, the colors look fine on screen, and then someone asks the question nobody can answer from memory: does this text actually pass? The answer lives in one number, the contrast ratio, and in a short table of thresholds that decides whether that number is good enough. Once you understand where the number comes from, the table becomes a check you can run on any pair of colors in seconds.
This guide explains what a contrast ratio measures, how the WCAG 2.1 formula produces it, and which of the four thresholds applies to your text. Every pair mentioned can be tested with the free Color Contrast Checker on Ovatly.
Contents
- Quick answer
- What the ratio actually measures
- How to read a number like 5.17:1
- The four thresholds that matter
- Normal text vs large text
- Which level should you aim for?
- How to check a pair, step by step
- Worked example: one blue against all four thresholds
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
A contrast ratio is the relative luminance of the lighter color divided by the relative luminance of the darker color, written as a number like 4.5:1. WCAG AA requires at least 4.5:1 for normal text and 3:1 for large text. WCAG AAA requires 7:1 for normal text and 4.5:1 for large text. Large text means at least 18pt, or 14pt bold. Enter any text and background pair into the Color Contrast Checker and it reports the ratio plus pass or fail for each of the four combinations.
What the ratio actually measures
The ratio is not a measure of how different two colors look in hue. Blue text on a red background can look vivid and still score badly, because the formula ignores hue almost entirely. What it measures is luminance: how much light each color effectively gives off, as computed by the WCAG 2.1 relative luminance formula. That formula weights the red, green and blue channels the way human vision does.
The ratio then puts the lighter color's luminance over the darker color's luminance. Because the lighter value always goes on top, the result runs from 1:1, where the two colors are the same and text is invisible, up to 21:1 for pure black on pure white. Every real design sits somewhere in between.
How to read a number like 5.17:1
Read it as a comparison, not a grade. 5.17:1 says the lighter color is a little over five times as luminous as the darker one. The number alone means nothing until you hold it against the threshold your text size demands, which is why the checker reports pass and fail alongside the ratio.
One property surprises people: the ratio is symmetric. White text on blue scores exactly the same as blue text on white, because the formula only cares which color is lighter, not which one is the lettering. Swapping a pair is still worth testing, since the preview shows how each direction looks, but the number will not move.
The four thresholds that matter
WCAG defines two conformance levels for contrast, AA and AAA, and each level sets one threshold for normal text and a lower one for large text. That gives four numbers in total:
- AA, normal text: 4.5:1
- AA, large text: 3:1
- AAA, normal text: 7:1
- AAA, large text: 4.5:1
Notice that AAA for large text asks exactly what AA asks of normal text. A pair can pass two rows and fail the other two at once, which is why the checker shows all four rows instead of a single verdict.
Normal text vs large text
The split between normal and large text has an exact definition, and guessing it is where many checks go wrong. Large text means at least 18pt, or 14pt bold. Everything smaller counts as normal text, including 14pt regular and the 16px body copy most websites use, since 16px is roughly 12pt.
So a headline in a large bold size plays by the 3:1 or 4.5:1 rows, while the paragraph under it plays by the 4.5:1 or 7:1 rows, even in the same colors. Check each text size against its own row rather than approving the palette once.
Which level should you aim for?
AA is the working target. It is the level most laws and procurement rules reference, so a site or document that passes AA everywhere meets the standard the outside world enforces. AAA is the stretch goal: stricter, and worth choosing for body text when the design allows it, because long reading at 7:1 is easier on the eyes.
What AAA is not is a sensible blanket rule. Demanding 7:1 from every element, including brand accents and large display type, throws away colors that are perfectly readable at their size. The practical approach is AA everywhere as the floor, AAA for the main reading text where the palette can afford it, and brighter brand colors kept for headings, borders and graphics where thresholds are lower or do not apply.
How to check a pair, step by step
- Open the Color Contrast Checker and enter the text color and the background color.
- Read the ratio and the preview at the top of the results.
- Check the AA and AAA rows for your text size: normal or large, using the 18pt and 14pt bold definition.
- Use Swap colors to test the inverse pairing, for example a button that reverses on hover.
Worked example: one blue against all four thresholds
Take the blue #2563EB on a white background, #FFFFFF. The checker measures it at 5.17:1. Held against the four thresholds, that single number produces four different answers:
- AA normal text (needs 4.5:1): pass.
- AA large text (needs 3:1): pass.
- AAA large text (needs 4.5:1): pass.
- AAA normal text (needs 7:1): fail.
So this blue is safe for body text at AA and for headlines at any level, but it cannot carry AAA body text. Nothing about the color changed between rows; only the demand did. That is the whole logic of contrast checking in one example.
Limitations and honest tradeoffs
The ratios in the checker follow WCAG 2.1 exactly. WCAG 3 drafts use a different model, called APCA, and can judge the same pair differently. Until WCAG 3 is final, the 2.1 numbers are the ones to work to.
Contrast is also only one part of readability. Thin font weights and small sizes can still be hard to read at a passing ratio, because the formula knows nothing about the shape of your letters. Treat a pass as permission to use the pair, not as proof that every setting of it will read well.
Common mistakes
- Checking a palette once instead of pair by pair. Contrast belongs to a specific text color on a specific background. Every new pairing is a new check.
- Calling 16px body text large. Large starts at 18pt, or 14pt bold. Ordinary body copy is normal text and needs the higher ratio.
- Judging by hue difference. Bright against bright can still fail, because the formula measures luminance, not how colorful the contrast looks.
- Retesting after swapping and expecting a new number. The ratio is symmetric. Swap to judge the preview, not to shop for a better score.
- Abandoning a brand color that fails for body text. Darken it one step at a time until it passes, and keep the original for headings, borders and graphics.
FAQs
What is a contrast ratio in plain terms? It is a single number that says how much lighter the lighter of two colors is than the darker one, measured with the WCAG relative luminance formula. A ratio of 1:1 means the two colors are identical and the text is invisible. Higher numbers mean easier reading.
What ratio should I aim for? Aim for AA: at least 4.5:1 for normal text and 3:1 for large text. AA is the level most laws and procurement rules reference. Where the design allows it, AAA (7:1 for normal text) is worth choosing for long body text.
What counts as large text? Large text means at least 18pt, or 14pt bold. Everything smaller counts as normal text and must meet the stricter threshold for its level.
Does it matter which color is the text and which is the background? No. The ratio is symmetric, so white text on blue scores exactly the same as blue text on white. What changes is which size threshold your text has to meet, not the number itself.
My brand color fails on white. What now? Darken it one step at a time until it passes, and reserve the original bright version for large headings, borders and graphics, which have lower thresholds or none.
Conclusion
A contrast ratio turns a vague worry about readability into a number you can check in seconds: luminance of the lighter color over the darker, held against 4.5:1 or 3:1 for AA and 7:1 or 4.5:1 for AAA, with large text defined as 18pt or 14pt bold. The real decision is not the ratio itself but the level you commit to, and our comparison of WCAG AA vs AAA works through that choice. For more guides in this series, see our Color and Design Tools guides.
References
- W3C, Web Content Accessibility Guidelines (WCAG) 2.1, on the relative luminance definition and the contrast minimums for AA and AAA: https://www.w3.org/TR/WCAG21/