What Is Color Contrast and Why Does It Matter?
Color contrast decides whether text is easy to read. Learn what contrast ratio means, WCAG AA and AAA targets, and how to fix low contrast.
Color contrast is the difference in brightness between two colors placed together — most often, between text and its background. When the difference is large, text is easy to read. When the difference is small, text can look faded, blurry, or invisible, even if the colors themselves look attractive. That is why contrast matters in every design: a website, an app, a presentation, or a poster is only useful if people can actually read it.
What Is Contrast Ratio?
Contrast ratio is a number that describes how different two colors are in brightness. It is written as a ratio, such as 4.5:1 or 7:1. The first number tells you how much brighter one color is than the other. A ratio of 1:1 means the two colors are identical — for example, white text on a white background — so there is no contrast at all. A ratio of 21:1 is the highest possible, for black text on a white background, which is the strongest contrast you can get. The important idea is simple — a higher ratio means easier reading, and a lower ratio means harder reading.
WCAG Levels AA and AAA, in Plain Terms
WCAG stands for Web Content Accessibility Guidelines, a widely used set of recommendations for making websites accessible. WCAG describes two levels of contrast targets, called AA and AAA. AA is the common target most websites aim for, and AAA is a stricter target for even better readability. For normal text, the widely known WCAG AA target is a contrast ratio of at least 4.5:1. For large text, the AA target is at least 3:1, because larger and bolder text is easier to read even with a little less contrast. The AAA targets are stricter: at least 7:1 for normal text and at least 4.5:1 for large text.
| Text type | WCAG AA target | WCAG AAA target |
|---|---|---|
| Normal text | At least 4.5:1 | At least 7:1 |
| Large text | At least 3:1 | At least 4.5:1 |
Think of AA as the level to aim for in most designs, and AAA as a higher level to reach when you can, especially for long articles. If you are building a color palette, check contrast early — it is much easier to adjust a shade at the start than to fix every page later. Our guide to how to create a professional color palette shows how to build a palette with readable combinations from the beginning.
How to Check Contrast
Checking contrast takes only a minute, and it should be part of every design review. Start by listing the text and background combinations you actually use: body text on the page background, headings on colored sections, button labels on button colors, and links in the middle of a paragraph. For each combination, enter the two HEX codes into a contrast checker and note the ratio. Check your design on a phone as well as a laptop, and if possible, in bright light. If you need the exact color values to test, use the online color picker to pick them from your design.
- Body text on the page background.
- Headings on coloured sections.
- Button labels on button colours.
Text Over Images and Gradients
Text over images and gradients is one of the most common places where contrast fails. A photo may have light and dark areas, so white text that is readable on the dark part may disappear on the light part. A gradient that moves from light to dark can have the same problem — the text may be fine at one end and unreadable at the other. The simplest fix is to add a solid or semi-transparent dark overlay behind the text, so the text always sits on a consistent background. If you use a gradient as a background, test the text at both ends of the gradient, not just in the middle. A gradient made with the CSS gradient generator can look beautiful, but you should still check that the text color has enough contrast against the lightest and the darkest parts.
Buttons, Links, and Practical Fixes
Contrast also matters for things people need to click or tap. A button should stand out from the page, and its label should stand out from the button. A common mistake is using a light button with white text, or a colored button with a label in a similar shade. Check the label-to-button ratio the same way you check text-to-background, and aim for the AA targets for normal text. Links need to be easy to spot as well. If a link is the same color as normal text, people may not realise it is clickable, so make links a distinct color with enough contrast and add an underline or another visual cue.