Light gray text on white looks elegant on a designer's bright monitor and disappears on a phone in sunlight. For people with low vision or color deficiency, weak contrast makes content unreadable. The Color Contrast Checker calculates the ratio between two colors so you can test your palette against the accessibility guidelines.
Color Contrast Checker FREE online toolRuns in your browser. No sign-up, nothing to install. Open the tool →The numbers that matter
The Web Content Accessibility Guidelines (WCAG) express contrast as a ratio from 1:1 (identical colors) to 21:1 (black on white). Level AA, the common legal and policy target, asks for at least 4.5:1 for normal text and 3:1 for large text. Large means roughly 24 pixels, or 18.66 pixels if bold. Interface components such as input borders and icons also need 3:1 against their surroundings. Level AAA raises the bar to 7:1 for normal text.
Run a check
- Enter the text color as a hex code, for example #767676.
- Enter the background color, such as #FFFFFF.
- Read the ratio. For this pair it is about 4.5:1, which just passes AA for normal text.
- Check whether your text is normal or large, then compare against 4.5:1 or 3:1.
- If it fails, darken the text or lighten the background in small steps until it passes, and record the new values.
Where websites usually fail
- Placeholder text and light gray helper text in forms.
- White text on bright brand colors, such as yellow, light green or orange buttons.
- Text over photographs or gradients, where contrast changes across the image.
- Disabled-looking links that are really active.
- Hover and focus states, which are often only checked in the default state.
- Dark mode palettes that were adjusted by eye.
Fix colors without losing your brand
You rarely need a new brand color. Create a darker shade for text and keep the original for large decorative areas. A bright orange button can keep its fill if the label is dark enough, or you can darken the fill and keep the label white. Define the accessible variants once as design tokens, so every page uses the same checked values.
Do not rely on color alone to convey meaning. Errors shown only in red are invisible to some people, so add an icon or a text message as well.
Record the results
Keep a small table with the foreground color, background color, ratio, level reached and where the pair is used, such as footer links or primary button label. Share it with designers and developers so that a new component starts from approved pairs instead of a fresh guess. When a stakeholder asks why a light gray was darkened, the table answers the question in one line, and it provides evidence if your organization has to report accessibility conformance later.
Do not forget the focus ring
Keyboard users depend on a visible focus indicator. The outline around a focused button or link should reach 3:1 against the colors next to it, which many default styles fail on dark or colored backgrounds. Tab through your page once, and test those outline colors in the checker too.
Test more than one condition
Contrast ratios are a baseline, not a full accessibility audit. Zoom the page to 200 percent, try your site on a phone outdoors, and use your operating system's high-contrast or dark mode. Ask someone who actually uses assistive features to review key pages. Document your checks so you can show your decisions during a review, and recheck after every redesign or theme change.
Comments (0)
No comments yet. Be the first to share a thought.