Free WCAG Color Contrast Checker
The Color Contrast Checker measures the WCAG contrast ratio between a foreground and background color. It tells you whether your combination passes accessibility guidelines for normal and large text.
Contrast is only one part of accessibility, so the Color Blindness Simulator is the companion check. Palettes that pass it can be built with the Color Harmony Generator and the Material Color Palette Generator.
How to use the Contrast Checker
- 1 Enter the foreground colour — the text — and the background colour it will sit on.
- 2 Read the ratio. Anything at or above 4.5:1 passes WCAG AA for normal body text, and 3:1 passes for large text.
- 3 Check the AAA row if you are aiming higher, which needs 7:1 for normal text.
- 4 Nudge either colour and watch the ratio respond, so you can find the smallest change that clears the threshold.
How the ratio is calculated
WCAG computes relative luminance for each colour from its linearised sRGB channel values, weighting green most heavily because the human eye is most sensitive to it, then red, then blue. The contrast ratio is the luminance of the lighter colour plus 0.05, divided by the same figure for the darker.
Two consequences follow from that formula. Pure black against pure white is the maximum possible at 21:1. And because the ratio only ever compares luminance, two colours of identical lightness produce a ratio of 1:1 no matter how different their hues look — which is exactly why a red button on a green background can be unreadable while seeming perfectly distinct.
- AA requires 4.5:1 for normal text and 3:1 for large text.
- AAA requires 7:1 for normal text and 4.5:1 for large text.
- The formula is symmetric: swapping foreground and background gives the same number.
- It does not account for font weight, letter spacing or anti-aliasing quality, so treat the threshold as a floor.
Frequently asked questions
Which text counts as "large" for the lower 3:1 threshold?
WCAG defines large text as at least 18 points, or 14 points when bold. In pixels that is roughly 24px regular or 18.66px bold. The logic is that thicker strokes are easier to resolve, so a lower ratio still reads comfortably — it is not permission to use low-contrast text in a heading that is visually small.
The ratio passes but the text still looks washed out. Why?
A contrast ratio is a minimum for legibility, not a measure of comfort. Two colours can clear 4.5:1 and still be tiring if one is a saturated hue and the other is near its own lightness, because the eye has to work harder to separate them than the raw luminance difference suggests. For long passages of body text, aim comfortably above the threshold rather than landing exactly on it.
Does the checker apply to icons and borders too?
Yes, but with different rules. Non-text content such as icons that convey meaning, form field borders, and focus indicators need 3:1 against their adjacent colour under the WCAG 1.4.11 criteria. Purely decorative elements that carry no information are exempt — but if removing the element would lose meaning, it is not decorative.
Related Image & Color Tools
You might also need
Tools from other categories that people pair with the Contrast Checker: