The WebAIM Contrast Checker is the most widely used color contrast tool on the internet — and for good reason. It's free, fast, and gives you an instant pass/fail verdict against WCAG standards. But are you using it to its full potential? And are there situations where a different tool might serve you better?I've used the WebAIM contrast checker on hundreds of accessibility audits. Here's everything you need to know to get the most out of it, along with the best alternatives for scenarios where WebAIM alone isn't enough.
How to Use the WebAIM Contrast Checker
Getting started
Navigate to webaim.org/resources/contrastchecker. You'll see two color input fields: foreground (text color) and background color. Enter hex color codes (like #333333 for dark gray text) or use the built-in color picker. The tool instantly calculates the contrast ratio and shows pass/fail results for WCAG AA and AAA at both normal and large text sizes.
Try Our Free Color Contrast Checker
Test your color combinations against WCAG AA & AAA requirements instantly.
Check Color Contrast →Reading the results
The results panel shows four ratings. WCAG AA Normal Text requires 4.5:1 — this is the most important one for body text, links, and form labels. WCAG AA Large Text requires 3:1 — applies to headings and text 24px or larger. WCAG AAA Normal Text requires 7:1 — the enhanced standard, harder to achieve but ideal for maximum readability. WCAG AAA Large Text requires 4.5:1 — enhanced standard for large text. A green checkmark means pass, a red X means fail.
The lightness slider trick
The most underused feature is the lightness slider below each color field. When a color combination fails, slide the foreground or background lightness until you find the nearest compliant shade. This lets you stay within your brand color family while meeting accessibility requirements. The ratio updates in real time as you slide — stop as soon as you see the green checkmark.
Practical Examples and Common Scenarios
Testing your brand colors
Start by testing your primary brand color as text on white, as text on black, and as a background with white text and black text. This gives you four fundamental combinations. Most brand colors work in at least two of these configurations. For example, a medium blue (#2B6CB0) passes as text on white (5.17:1) and as a background with white text (5.17:1), but might fail as text on a light blue background.
Testing link colors
Links have a special requirement. They must have sufficient contrast against both the background AND be distinguishable from surrounding text. The easiest solution: underline all links (removing the need for color distinction) and ensure the link color has 4.5:1 contrast against the background. If you remove underlines from links, the link color must have at least 3:1 contrast against surrounding body text in addition to 4.5:1 against the background.
Testing buttons and UI components
WCAG 2.1 added requirements for non-text contrast (Success Criterion 1.4.11). UI components like buttons, form field borders, and icons need a 3:1 contrast ratio against their adjacent background. A light gray border (#CCCCCC) on a white background has only a 1.6:1 ratio — it fails. Use the WebAIM tool to check border colors and icon colors against their backgrounds.
| Common Color Combination | Hex Codes | Ratio | AA Normal | AA Large |
|---|---|---|---|---|
| Black on white | #000000 on #FFFFFF | 21:1 | Pass | Pass |
| Dark gray on white | #333333 on #FFFFFF | 12.6:1 | Pass | Pass |
| Medium gray on white | #767676 on #FFFFFF | 4.54:1 | Pass | Pass |
| Light gray on white | #999999 on #FFFFFF | 2.85:1 | FAIL | FAIL |
| White on blue | #FFFFFF on #2B6CB0 | 5.17:1 | Pass | Pass |
| White on red | #FFFFFF on #E53E3E | 3.64:1 | FAIL | Pass |
Best Alternatives to WebAIM Contrast Checker
Colour Contrast Analyser (CCA) by TPGi
For desktop testing, the CCA is the industry standard. Free for Windows and Mac. Its eyedropper tool picks colors directly from any application — not just browsers. Test PDFs, design mockups, desktop software, and email clients. It also simulates color blindness types (protanopia, deuteranopia, tritanopia, achromatopsia). Download from tpgi.com/color-contrast-checker. Every accessibility auditor I know uses this tool daily.
Stark (Figma/Sketch Plugin)
For designers, Stark integrates directly into Figma and Sketch. Select two layers, and Stark shows the contrast ratio with WCAG pass/fail indicators without leaving your design tool. The Pro version ($48/year) adds Vision Simulator (colorblindness preview), Focus Order checker, and full WCAG audit. If your team designs in Figma, Stark prevents contrast issues at the source.
Chrome DevTools (Built-in)
The most convenient option for developers. Inspect any text element, click the color swatch in the Styles panel, and Chrome shows the contrast ratio against the computed background with AA/AAA indicators. It even suggests the closest color that would pass. No install needed — it's built into every Chrome browser. Firefox has similar functionality in its accessibility inspector.
Contrast Grid by Eight Shapes
Need to test multiple colors at once? Contrast Grid (contrast-grid.eightshapes.com) generates a matrix of every possible combination of your color palette. Enter all your brand colors and see at a glance which combinations pass AA, which pass AAA, and which fail. Essential for design system teams establishing an accessible color palette.
Polypane (Browser)
Polypane is a developer-focused browser that shows contrast ratios directly in the page for all text elements simultaneously. Hover over any text and see its contrast ratio without opening DevTools. It also shows a contrast overlay that highlights all failing elements in red. At $10/month, it's a premium tool — but for developers who do frequent accessibility work, the time savings are substantial.
When WebAIM Isn't Enough
Text on images and gradients
WebAIM works with solid colors. But what about text overlaid on a photograph or a gradient? The contrast varies across the image. For these cases, use the CCA eyedropper to sample the lightest and darkest areas behind the text. If the contrast fails at any point, the combination is non-compliant. The fix: add a semi-transparent overlay or a solid-color banner behind the text.
Dynamic and interactive content
Hover states, focus indicators, error messages, and toast notifications all need contrast checking — but they're transient. The WebAIM tool can't test these directly. Use Chrome DevTools to force pseudo-states (:hover, :focus, :active) and then check the contrast of the resulting colors. For animations and transitions, pause them and check each state individually.
Non-web content
WebAIM is designed for web colors. For PDFs, Word documents, email templates, and native applications, use the CCA desktop tool with its eyedropper. For mobile apps, use the Accessibility Scanner (Android) or Accessibility Inspector (iOS/Xcode). The WCAG contrast requirements apply equally to all digital content, not just websites.
- Bookmark the WebAIM Contrast Checker for quick daily use
- Install the Colour Contrast Analyser for desktop and PDF testing
- Add Stark to your Figma workflow for design-time checks
- Use Chrome DevTools contrast checker during development
- Generate a Contrast Grid for your complete color palette
- Test all states: default, hover, focus, active, disabled, error
- Document passing combinations in your design system
Advanced Contrast Topics
APCA: The next generation of contrast
The Advanced Perceptual Contrast Algorithm (APCA) is being developed for WCAG 3.0. Unlike the current formula (based on relative luminance), APCA accounts for spatial frequency (text size and weight), polarity (dark text on light vs. light text on dark), and adaptation level. It produces more perceptually accurate results but is not yet an official standard. Some tools already offer APCA as an optional metric alongside the current WCAG formula.
Contrast and font weight
Thin fonts need higher contrast than bold fonts of the same size. A 300-weight font at 16px is harder to read than a 700-weight font at 16px, even at the same contrast ratio. WCAG currently accounts for this only at the large text threshold (14pt bold = large text). In practice, avoid using thin font weights (100-300) for body text, especially at smaller sizes, regardless of contrast ratio.
Contrast in data visualizations
Charts, graphs, and data visualizations present unique contrast challenges. Each data series must have 3:1 contrast against its background and ideally against adjacent series. Use distinct patterns or textures in addition to color. Always include a data table alternative for screen reader users. Tools like Viz Palette help you choose accessible color schemes for data visualization.
How do I use the WebAIM Contrast Checker?
Go to webaim.org/resources/contrastchecker, enter your foreground (text) and background hex color codes, and the tool instantly shows the contrast ratio with pass/fail results for WCAG AA and AAA at normal and large text sizes. Use the lightness slider to find the nearest compliant shade if your current combination fails.
What are the best alternatives to the WebAIM Contrast Checker?
The Colour Contrast Analyser (CCA) by TPGi is the best desktop alternative with an eyedropper for testing any on-screen content. Stark is ideal for designers working in Figma or Sketch. Chrome DevTools has a built-in contrast checker for developers. Contrast Grid by Eight Shapes tests entire color palettes at once. Each tool serves a different workflow.
Can the WebAIM tool check contrast on images?
No, the WebAIM Contrast Checker only works with solid hex colors. For text on images, gradients, or variable backgrounds, use the Colour Contrast Analyser desktop tool which has an eyedropper to sample actual on-screen colors from any area. Check contrast at the lightest and darkest points behind the text to verify compliance across the entire range.