# axe color-contrast: Insufficient colour contrast

The finding means the contrast between the text colour and the colour behind it is below 4.5:1, or below 3:1 for large text. Typical culprits are light grey text, white lettering on bright brand colours and semi-transparent text. Fix it with a darker text or background colour, defined once in a central place.

## The message

- Identifier: `color-contrast`
- Type of check: automatic
- Severity: serious
- Success criterion: [WCAG 1.4.3 Contrast (Minimum)](https://barrierepruefung.de/en/knowledge/wcag/1-4-3-contrast-minimum)
- Meaning: The ratio between text and background colour falls below the required minimum.
- Impact: People with impaired vision, or anyone in poor lighting, cannot read the text.
- Fix: Raise the contrast to at least 4.5:1, or 3:1 for large text.

## What the rule checks

For every visible piece of text, axe works out the text colour and the colour that actually sits
behind it, then calculates the contrast ratio. Transparent backgrounds and the `opacity` of parent
elements are blended in. Large text is recognised by size and weight: 18 points, or 14 points when
bold.

Sometimes the background cannot be determined: there is an image or a gradient behind the text,
another element covers it, or the text is part of an image. axe then makes no decision, and the spot
appears in the report as an uncertain result with a screenshot for a person to judge, not as a
defect.

## Common causes

- **Light grey as a style.** Secondary text, dates, captions and footers in `#999999` on white
  reach 2.85:1.
- **White lettering on bright brand colours.** Buttons and banners in orange, yellow or light
  blue: white on `#f59e0b` only reaches 2.15:1.
- **Transparency.** Text with `opacity: 0.6`, or a colour with an alpha channel, looks lighter
  than its colour value suggests, and axe measures what is rendered.
- **Sections nobody restyled.** A link or button keeps its colour when it is placed in a section
  with a dark or coloured background.
- **Text that only looks disabled.** Genuinely disabled controls are exempt. A button styled to
  look faint that still works is not.

## How to fix it

Define colours once rather than fixing element after element. With custom properties, a single
change covers the whole site:

```css
:root {
  --text-muted: #767676;  /* 4.54:1 on white, previously #999999 at 2.85:1 */
  --brand-fill: #b45309;  /* white on it: 5.02:1, previously #f59e0b at 2.15:1 */
}

.meta,
.caption {
  color: var(--text-muted);
}

.button {
  color: #ffffff;
  background-color: var(--brand-fill);
}
```

Replace transparency on text with a solid colour that can be measured:

```css
/* before */
.note { color: #000000; opacity: 0.5; }

/* after */
.note { color: #595959; } /* 7.0:1 on white */
```

Check the new colour on every background it appears on, not just on white. If the brand colour
cannot deliver enough contrast, keep it for surfaces and borders and set the text on it in a dark
colour instead of white.

For text over images axe cannot calculate a ratio, and the spot remains an uncertain result. It only
becomes measurable with an opaque surface behind the lettering:

```css
.hero h2 {
  color: #ffffff;
  background-color: #1a1a1a; /* 17.4:1 */
  padding: 0.25em 0.5em;
}
```

A semi-transparent surface lets the image show through. axe cannot measure that either, and for the
manual decision the lightest part of the image behind the text is what counts.

What the criterion requires in detail, and what is exempt, is explained on the page
[about WCAG 1.4.3](https://barrierepruefung.de/en/knowledge/wcag/1-4-3-contrast-minimum).

## Sources

- [Deque University: color-contrast (axe-core 4.13)](https://dequeuniversity.com/rules/axe/4.13/color-contrast), retrieved on 2026-11-27
- [W3C Techniques, G18: Ensuring that a contrast ratio of at least 4.5:1 exists between text (and images of text) and background behind the text](https://www.w3.org/WAI/WCAG22/Techniques/general/G18), retrieved on 2026-11-27

---

As of: 2026-11-29 · https://barrierepruefung.de/en/knowledge/rules/color-contrast
