Background and foreground colors have a sufficient contrast ratio

Text and background colors meet minimum contrast ratios.

On this page

Impact

ScanGov impact ratings

About

Low-contrast text is difficult or impossible for many users to read. [Learn how to provide sufficient color contrast](https://dequeuniversity.com/rules/axe/4.10/color-contrast).

Risks

Users with low vision cannot read your text.

Why it's important

Makes text readable for users with low vision or color blindness by ensuring sufficient visual distinction.

User stories

As a user with low vision, I want sufficient color contrast so that I can read all text content clearly.

Code

Failing pattern:

/* Fail: 2.7:1 contrast ratio (below 4.5:1 minimum) */
p { color: #949494; background-color: #ffffff; }

Passing pattern:

/* Pass: 5.74:1 contrast ratio */
p { color: #595959; background-color: #ffffff; }

Error

ScanGov messaging when a site fails a standard:

Failed: Background and foreground colors have a sufficient contrast ratio

Guidance

Indicators

On this page