Guides › Text & developer
Is your text readable? 16 common colour pairs tested against WCAG contrast rules
Light grey text looks elegant in a design file and becomes unreadable on a phone in sunlight. The Web Content Accessibility Guidelines (WCAG), the standard behind accessibility laws in many countries, turn "readable" into a number: the contrast ratio between text and background. We measured 16 colour pairs that designers commonly use with our colour picker and contrast checker.
Short answer: normal text needs a contrast ratio of at least 4.5:1 (level AA); large text needs 3:1. The margins are tight: grey #777777 on white is 4.48:1 and fails, while #767676 is 4.54:1 and passes. White text on pure red (4.0:1), green buttons and orange or amber backgrounds commonly fail for normal-size text.
What the ratio means
The contrast ratio compares how bright two colours appear, using a formula for "relative luminance" that weights green most and blue least, as human vision does. It runs from 1:1 (identical colours) to 21:1 (black on white). WCAG sets these thresholds:
| Level | Normal text | Large text (about 24 px, or 19 px bold) |
|---|---|---|
| AA (the usual legal and industry target) | 4.5:1 | 3:1 |
| AAA (enhanced) | 7:1 | 4.5:1 |
Icons, form field borders and chart lines that are needed to understand the page fall under a separate rule requiring 3:1 against their surroundings.
The measurements
| Text | Background | Ratio | AA normal | AA large |
|---|---|---|---|---|
| Black #000000 | White #ffffff | 21.00:1 | Pass | Pass |
| White #ffffff | Dark mode grey #121212 | 18.73:1 | Pass | Pass |
| Black #000000 | Amber #f59e0b | 9.78:1 | Pass | Pass |
| White #ffffff | Blue #2563eb | 5.17:1 | Pass | Pass |
| Grey #6b7280 | White | 4.83:1 | Pass | Pass |
| Grey #767676 | White | 4.54:1 | Pass | Pass |
| White | Blue #1a73e8 | 4.51:1 | Pass | Pass |
| Grey #777777 | White | 4.48:1 | Fail | Pass |
| White | Red #ff0000 | 4.00:1 | Fail | Pass |
| White | Green #16a34a | 3.30:1 | Fail | Pass |
| Grey #959595 | White | 3.00:1 (really 2.995) | Fail | Fail (just) |
| Red #ff0000 | Green #00ff00 | 2.91:1 | Fail | Fail |
| Light grey #9ca3af | White | 2.54:1 | Fail | Fail |
| White | Amber #f59e0b | 2.15:1 | Fail | Fail |
| Border grey #e5e7eb | Off-white #f9fafb | 1.18:1 | Fail | Fail |
| Yellow #ffff00 | White | 1.07:1 | Fail | Fail |
Our tool rounds to two decimals and compares the unrounded value with the threshold, so 4.48 fails and 4.51 passes. #959595 on white displays as 3.00:1 but is really 2.995:1, so it just misses the 3:1 minimum for large text; #949494 (3.03:1) is the lightest pure grey that passes.
What the results show
Mid-grey is where most designs fail
The grey placeholder text, captions and "secondary" labels in many interfaces sit between #999 and #aaa, around 2.3 to 2.8:1. The darkest common mistake, #777, misses by 0.02. If you want grey text on white, #767676 is the lightest pure grey that passes AA.
Saturated colours are darker or lighter than they look
Pure red looks intense, but its luminance is moderate, so white text on it reaches only 4.0:1. Green and especially yellow and amber are very bright, so white text on them fails badly; black text on amber, at 9.78:1, passes even AAA. Choose the text colour by measurement, not by what looks "bold".
Hue alone carries no contrast
Red on bright green is two strongly different hues, yet only 2.91:1, and for people with red-green colour vision deficiency, which is common among men, the two can look almost identical. Never rely on colour alone to convey meaning, such as red for errors; add text or an icon.
How to check your own colours
- Pick colours from a design or screenshot with the eyedropper tool, or enter hex codes directly.
- Open the contrast checker, set the text and background colours, and read the ratio and AA/AAA results.
- If a colour fails, darken or lighten it in small steps until it passes, and keep the brand hue the same. Often a change your users will not notice is enough.
- Check hover, disabled and focus states and text on images, which are where contrast problems often hide.
Common questions
Do disabled buttons need to pass?
No. WCAG exempts inactive interface components and purely decorative text, as well as logos. Everything users need to read or operate should pass.
Is a higher ratio always better?
Up to a point. Some readers, including some people with dyslexia, find pure black on pure white glaring and prefer very dark grey on off-white, which still exceeds 15:1.
Does WCAG 3 change the formula?
A new contrast method has been discussed for future versions, but WCAG 2.2 and its 4.5:1 rule remain the current standard referenced by regulations.
References
- W3C WCAG 2.2, Success Criterion 1.4.3 Contrast (Minimum)
- W3C WCAG 2.2: definition of relative luminance and contrast ratio
- W3C WAI: Understanding Success Criterion 1.4.3
- W3C WCAG 2.2, Success Criterion 1.4.11 Non-text Contrast
Written and checked by Ria Kim for GlowHalo; figures without a source link come from the steps shown on this page. Companion tool: Color Converter & Contrast Checker. Spotted an error? Write to help@glowhalo.org.