Quick answer: Color contrast accessibility means text and important interface elements stand out enough from their background for people with low vision, color blindness or a glare-covered phone screen to read them. WCAG 2.1 level AA asks for a contrast ratio of at least 4.5:1 for normal text, 3:1 for large text and 3:1 for meaningful non-text elements such as input borders and icons. Test with a contrast checker, fix the worst offenders first (body text, buttons, form fields, links) and stop relying on color alone to carry meaning.
Why contrast matters more than it looks
Low contrast is one of the most common accessibility problems on the web, and it is also one of the easiest to fix. Light gray text on white, white text on a pale photo and thin placeholder text inside form fields all look clean in a design mockup on a bright monitor. They are much harder to read for:
- People with low vision or age-related changes in eyesight
- People with color vision deficiencies
- Anyone reading on a phone outdoors or on a cheap, dim screen
- Anyone tired, distracted or in a hurry
If visitors cannot read your pricing, your form labels or your call to action, they leave. Accessibility and conversion point the same way here. Our article on call to action buttons covers why a readable button beats a stylish one.
The WCAG contrast rules in plain language
The Web Content Accessibility Guidelines (WCAG) 2.1 define contrast as a ratio between the lighter and darker color, from 1:1 (no contrast) to 21:1 (black on white).
Text (success criterion 1.4.3, level AA)
- Normal text: at least 4.5:1
- Large text: at least 3:1. Large means roughly 24px regular or about 18.5px bold and above.
- Exceptions: logos, decorative text and text in inactive (disabled) controls
Enhanced text contrast (1.4.6, level AAA)
- Normal text 7:1, large text 4.5:1. AAA is a good goal for long reading content, but most organisations aim for AA as the baseline.
Non-text contrast (1.4.11, level AA, added in WCAG 2.1)
- User interface components: input borders, checkboxes, focus indicators and button outlines need 3:1 against adjacent colors when they are the only way to see the control.
- Graphical objects: icons and chart lines that carry meaning need 3:1.
Use of color (1.4.1, level A)
Color must not be the only way you show information. A red border on an invalid field needs an error message too. A chart needs labels or patterns, not only colored lines.
How to test contrast
You do not need special software to start.
- Use a contrast checker. WebAIM’s contrast checker lets you enter two hex values and tells you whether they pass AA and AAA for normal and large text.
- Use browser developer tools. Chrome DevTools shows the contrast ratio when you inspect text and open the color picker, and marks the AA and AAA lines.
- Run an automated audit. Lighthouse (built into Chrome) and the axe browser extension flag low-contrast text across a page. They catch most text issues but miss text over images and gradients.
- Check manually where tools struggle. Text on photos, video backgrounds, gradients and hover states need a human eye. Zoom to 200 percent and look again.
- Try grayscale. Turn on your operating system’s grayscale mode or a browser extension that simulates color blindness. If a status, a link or a chart only makes sense in color, fix it.
Automated tools are a starting point. If you are tempted by a one-line widget that promises to fix contrast for you, read our view on accessibility overlays first.
Where contrast problems usually hide
Body text
Mid-gray body text on white is the classic issue. A common pattern is something like #999 on #fff, which falls well short of 4.5:1. Darkening body text to a near-black gray usually fixes it without changing the feel of the design.
Links
Links need to be distinguishable from surrounding text. If you remove underlines, the link color needs enough contrast with the background and enough difference from the body text, plus a visible hover and focus state. Keeping underlines in body copy is the simplest answer.
Buttons
White text on a light brand color (yellow, light green, sky blue) often fails. Options: darken the button color, use dark text on the light button, or keep the brand color for accents and use a darker shade for buttons.
Form fields
Watch for:
- Pale input borders that disappear against white backgrounds
- Placeholder text used instead of labels, especially in light gray
- Error states shown only with a red border
Use real labels above fields, give borders 3:1 contrast and add text to error messages. Our guide to form error messages goes further on writing errors people can act on.
Text over images
Hero banners with white text on a photo are a frequent failure. Add a dark overlay behind the text, move text to a solid panel, or choose images with a calm, dark area where text sits. Check the text against the lightest part of the image behind it, not the average.
Focus indicators
Keyboard users need to see where they are. Removing the default outline with outline: none and not replacing it is a serious problem. Provide a focus style with clear contrast against the background.
Dark mode
If you offer a dark theme, test it separately. Pure white text on pure black can feel harsh, but very dark gray text on black is the bigger risk. See our notes on dark mode website design for balance.
Fixing contrast without a full redesign
Most sites can reach AA without changing the brand.
- Make a short palette for text and controls. Pick one dark text color, one link color, one button color with its text color and one border color that all pass. Document the hex values.
- Adjust shades, not hues. If your brand blue fails on white, a slightly darker version of the same blue often passes and still reads as on-brand.
- Fix global styles first. Change the CSS variables or theme settings for body text, links, buttons and inputs. One change can fix hundreds of instances.
- Then fix templates and components. Hero banners, cards, footers and sidebars often have their own colors.
- Finally fix content. Editors sometimes add colored text in the editor. In WordPress, you can limit the color palette available in the block editor with theme support settings so editors pick from approved colors only.
Building contrast into your process
- Add contrast checks to design reviews before anything goes to development.
- Include contrast in your QA checklist alongside browser testing.
- Store approved color pairs in your style guide with their ratios.
- Re-test after brand updates and theme changes.
Small habits prevent the slow drift back to light gray text that happens when every new page is designed in isolation.
FAQ
Is AA contrast a legal requirement?
Many accessibility laws and policies point to WCAG level AA as the benchmark, including for public sector sites in several countries. Requirements differ by country and sector, so check what applies to you. AA is a sensible baseline either way.
Does contrast affect SEO?
Not directly as a ranking factor. It affects whether people can read and use your pages, which affects how long they stay and whether they convert.
Do logos need to meet contrast ratios?
No. Logos and brand marks are exempt from the text contrast rule, but think about readability anyway if the logo is the main way people identify the site.
What about disabled buttons?
Inactive controls are exempt, but make sure users understand why a button is disabled. A short message is better than a faded button with no explanation.
Make it readable for everyone
Good contrast costs almost nothing and helps every visitor. Set a passing palette, fix global styles, then clean up the edge cases. If you want a site that reads clearly and converts better, see how we help you turn visitors into customers.