Altwise · Guides

Colour contrast for websites: ratios, tools and quick fixes

Low contrast is the most common issue automated scans find. Light grey text, pastel buttons and text over photos are hard to read for people with low vision, older visitors, and anyone looking at a phone in sunlight.

The numbers

How to test

Use a contrast checker (WebAIM's is free): paste the text colour and background colour. Browser developer tools also show the ratio when you inspect text. For text on photos, test against the lightest part of the image behind the text.

Quick fixes

.hero { position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.hero > * { position: relative; }

Don't forget

Placeholder text, disabled-looking links, footer text and cookie banners are frequent offenders.

Related guides

All guides

Check your own site

Run a free homepage snapshot to see your top 3 issues, or order the $149 Fix-Pack for up to 10 pages with copy-paste fixes.