Bad color contrast is text or a control whose color sits too close to its background in lightness for many people to read. WCAG 2.2 measures it as a ratio and sets 4.5 to 1 for body text at Level AA. Below are a dozen real-world failures with their measured ratios, why each fails, and a fix that passes.
How bad contrast is measured
Contrast in WCAG is not a matter of taste or hue. It is a number computed from the relative luminance of the two colors, the lighter one first: (L1 + 0.05) / (L2 + 0.05). The WCAG 2.2 definition of contrast ratio gives the formula and notes that the result runs from 1 to 1, the same color twice, to 21 to 1, black on white. Every ratio on this page was computed with that formula from the hex values shown.
Two success criteria set the thresholds for text. Success Criterion 1.4.3, Contrast (Minimum), is Level AA, the level most teams aim for. Success Criterion 1.4.6, Contrast (Enhanced), is Level AAA.
| Text | Level AA (1.4.3) | Level AAA (1.4.6) |
|---|---|---|
| Normal text | 4.5 to 1 | 7 to 1 |
| Large text: at least 18 point, or 14 point bold | 3 to 1 | 4.5 to 1 |
| Logos, brand names, text in inactive controls, pure decoration | No requirement | No requirement |
The numbers come from vision research, not from design convention. The W3C’s Understanding document explains that 4.5 to 1 compensates for the loss of contrast sensitivity that typically comes with visual acuity of about 20/40, and that 7 to 1 does the same for about 20/80. A pair that fails is not merely unfashionable. It is the pair that a reader with ordinary age-related vision loss cannot read comfortably.
Bad color contrast examples, with the fix for each
The pairs below are the ones that turn up again and again in audits: grey body text, brand colors used behind white labels, status colors, and the classic clashing pairs. Each row gives the failing pair, its ratio, and a fix that keeps the intent of the design. The verdict is for normal-size text unless the row says otherwise.
| Bad pair (text on background) | Ratio | Why it fails | Fix | Fixed ratio |
|---|---|---|---|---|
| Light grey #999999 on white | 2.85 to 1 | Under 4.5 to 1; reads as disabled | Grey #595959 on white | 7.00 to 1 |
| Pale grey #cccccc on white, the usual placeholder grey | 1.61 to 1 | Placeholder text is still text the user needs | Grey #767676 on white | 4.54 to 1 |
| Grey #777777 on white | 4.48 to 1 | A near miss, and near misses fail | Grey #767676 on white | 4.54 to 1 |
| White on bright orange #ff5b1f | 3.10 to 1 | Passes only as large text | Black on #ff5b1f, or white on #c2410c | 6.77 to 1, 5.18 to 1 |
| White on yellow #ffff00 | 1.07 to 1 | Almost no difference in lightness | Black on #ffff00 | 19.56 to 1 |
| White on sky blue #87ceeb | 1.74 to 1 | A light background behind light text | White on #0369a1 | 5.93 to 1 |
| Link blue #3b82f6 on white | 3.68 to 1 | A popular button blue that fails for links | Blue #2563eb on white | 5.17 to 1 |
| Error red #ef4444 on white | 3.76 to 1 | The message the user most needs to read | Red #dc2626 on white | 4.83 to 1 |
| White on success green #22c55e | 2.28 to 1 | Bright greens are light, whatever their hue | White on #15803d | 5.02 to 1 |
| Red #ff0000 on green #008000 | 1.29 to 1 | Two saturated colors of similar lightness | Black on white, with the meaning in words | 21 to 1 |
| Blue #0000ff on red #ff0000 | 2.15 to 1 | Vibrates, and is low contrast as well | Pick one of the two, on white or black | 8.59 to 1 for blue on white |
| Grey #6b7280 on a light grey card #f3f4f6 | 4.39 to 1 | Passes on white, fails on the card | Grey #4b5563 on #f3f4f6 | 6.87 to 1 |
Three patterns account for most of the table. Greys are chosen by eye on a bright, calibrated monitor and fail on everyone else’s. Brand colors in the middle of the lightness range, oranges, bright greens, mid blues, sit near 3 to 1 against both white and black, so white labels on them fail. And the clashing pairs fail because hue does not count: red and green look very different, yet they can be almost the same lightness, which is all the ratio measures.
Why near misses and card backgrounds fail
The two hardest rows in the table are the quiet ones. Grey #777777 on white looks identical to #767676 on white, and only one of them passes. The Understanding document for 1.4.3 is explicit that the ratios are thresholds and must not be rounded: its own example is that 4.499 to 1 does not meet 4.5 to 1. A checker that displays two decimals and shows 4.5 for a pair of 4.48 is rounding, so read the unrounded value before calling a pair a pass.
The card row fails for a different reason. Contrast is measured against the background the text actually sits on, and the WCAG 2.2 definition adds that white is assumed when no background color is specified. A design system that checks its secondary grey against white, and then places the same grey on a tinted card, a table stripe or a hover state, ships a failure the design file never showed. The same happens with text over photographs and gradients: the ratio has to hold at the lightest point behind the text, not at its average.
Dark themes repeat the problem in reverse. Mid grey #808080 on black reaches 5.32 to 1 and passes Level AA, but light text set on a dark grey panel loses ratio quickly as the panel lightens, and secondary text in a dark theme is usually where it breaks.
Contrast beyond text: borders, icons and focus rings
Text is not the only thing that has to be seen. Success Criterion 1.4.11, Non-text Contrast, at Level AA, asks for at least 3 to 1 against adjacent colors for the visual information needed to identify user interface components and their states, and for the parts of graphics needed to understand the content.
Typical failures it catches:
- Input borders in pale grey #d1d5db on white, at 1.47 to 1, when the border is the only thing that shows where the field is. A border in #949494 reaches 3.03 to 1, the same grey the W3C uses in its own passing example of a focus indicator against white.
- Icon-only buttons drawn in a light tint, such as a close or search icon with no visible label.
- Focus rings that are too faint to see when a keyboard user tabs through the page. The focus indicator entry in the glossary covers what a usable one looks like.
- Chart lines and segments that can only be told apart by color, where each needs 3 to 1 against its neighbours or a second cue such as a pattern or a label.
Two cases are exempt, and they are often reported as bugs when they are not. A disabled control is not required to meet any contrast ratio, because it is not operable. And a control whose appearance is entirely the browser’s default, never restyled by the author, is outside the criterion as well.
When the problem is color itself, not contrast
Some color problems pass every ratio and still fail. Success Criterion 1.4.1, Use of Color, is Level A, the most basic level: color must not be the only visual means of conveying information, indicating an action or distinguishing an element. A form that marks invalid fields only by turning their borders red, a status column that says nothing but a green or red dot, or links set in a blue that differs from the body text only in hue, all depend on seeing color.
The fix is a second cue that does not depend on color: the word Error next to the field, a text label or an icon beside the dot, an underline on links within paragraphs. The red on green row in the table fails both ways at once, which is why it is the example people remember. It has almost no contrast, and it relies on the pair of colors that people with the most common color vision deficiencies confuse.
Finding and reporting contrast problems on a live site
Contrast is one of the few accessibility checks that can be measured exactly, so it is a good place to start an audit. The browser’s developer tools show the ratio of any text element: inspect it and open the color picker on its color property, as described in how to inspect element. Check every state, not only the default one: hover, focus, visited, error, disabled, and the dark theme if the site has one. Text over images needs a check at its lightest point.
Contrast is one item in a wider pass. The accessibility checklist runs it alongside keyboard, structure and form checks, and screen reader testing covers what a contrast check cannot, which is how the page is announced. The broader method is set out under accessibility testing.
A contrast bug is easy to fix and easy to lose, because a report that says the text is hard to read does not say which text, on which background, in which state. A useful report names the element, the two hex values, the measured ratio, the threshold it misses and the state it was in, with a screenshot of the page as the reporter saw it. Filed from the page with a feedback widget, the report carries the URL, the browser and the viewport as well, and evidence capture attaches the screenshot and the console, so the developer can reproduce the exact pair rather than guess at it.