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:

LevelNormal textLarge text (about 24 px, or 19 px bold)
AA (the usual legal and industry target)4.5:13:1
AAA (enhanced)7:14.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

AA 4.5:1Black #000000 on White #ffffff21:1White #ffffff on Dark mode grey #12121218.73:1Black #000000 on Amber #f59e0b9.78:1White #ffffff on Blue #2563eb5.17:1Grey #6b7280 on White4.83:1Grey #767676 on White4.54:1White on Blue #1a73e84.51:1Grey #777777 on White4.48:1White on Red #ff00004:1White on Green #16a34a3.3:1Grey #959595 on White3:1Red #ff0000 on Green #00ff002.91:1Light grey #9ca3af on White2.54:1White on Amber #f59e0b2.15:1Border grey #e5e7eb on Off-white #f9fafb1.18:1Yellow #ffff00 on White1.07:1
Contrast ratio of each colour pair — chart drawn from the table below.
TextBackgroundRatioAA normalAA large
Black #000000White #ffffff21.00:1PassPass
White #ffffffDark mode grey #12121218.73:1PassPass
Black #000000Amber #f59e0b9.78:1PassPass
White #ffffffBlue #2563eb5.17:1PassPass
Grey #6b7280White4.83:1PassPass
Grey #767676White4.54:1PassPass
WhiteBlue #1a73e84.51:1PassPass
Grey #777777White4.48:1FailPass
WhiteRed #ff00004.00:1FailPass
WhiteGreen #16a34a3.30:1FailPass
Grey #959595White3.00:1 (really 2.995)FailFail (just)
Red #ff0000Green #00ff002.91:1FailFail
Light grey #9ca3afWhite2.54:1FailFail
WhiteAmber #f59e0b2.15:1FailFail
Border grey #e5e7ebOff-white #f9fafb1.18:1FailFail
Yellow #ffff00White1.07:1FailFail

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

  1. Pick colours from a design or screenshot with the eyedropper tool, or enter hex codes directly.
  2. Open the contrast checker, set the text and background colours, and read the ratio and AA/AAA results.
  3. 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.
  4. 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

  1. W3C WCAG 2.2, Success Criterion 1.4.3 Contrast (Minimum)
  2. W3C WCAG 2.2: definition of relative luminance and contrast ratio
  3. W3C WAI: Understanding Success Criterion 1.4.3
  4. 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.

More guides

Text & developerUUID v4 or v7 as a database primary key? We inserted a million rows of eachRandom v4 keys were 3–4.7 times slower to insert than time-ordered v7 keys in our SQLite test. What causes the gap and when it matters.Read guide →Text & developerIs your random picker really fair? Modulo bias, measured on 6.2 million drawsA common shortcut made eight characters 25% more likely than the rest in our test. How fair random picks are made, and how to check a tool.Read guide →Text & developerHow big should a printed QR code be? What data length and error correction do to itWe generated QR codes for five real payloads at all four error-correction levels and counted the modules. Shorter data matters more than anything else.Read guide →