Assistive technologyTesting techniques
Colour contrast testing verifies that the luminance difference between
foreground text and its background meets the minimum ratios required by
WCAG. It is one of the few accessibility checks that can be performed
reliably by both automated tools and manual inspection, though each method
has limitations that make a combined approach necessary.
[1]
Element type
Minimum ratio
WCAG criterion
Normal text (under 18pt / 14pt bold)
4.5:1
1.4.3 AA
Large text (18pt+ or 14pt+ bold)
3:1
1.4.3 AA
UI components (borders, icons, focus indicators)
3:1
1.4.11 AA
Normal text enhanced
7:1
1.4.6 AAA
Decorative text, logotypes, and disabled components are exempt from
contrast requirements.
Automated scanners including axe-core reliably detect contrast failures
on solid text against a solid background. This covers the majority
of cases on most pages.
Tools such as a11ytest.ai run contrast checks as part of their standard
scan, reporting failures with the actual contrast ratio measured and the
minimum required, making it straightforward to prioritise fixes.
[2]
Limitations of automated contrast testing:
For these cases, manual testing is required.
Browser DevTools colour picker
A11ytest.ai use a logo contrast checker. Simply upload your logo and pick the background and foreground colours to see if your logo is compliant.
https://a11ytest.ai/logo-contrast-checker
Browser DevTools colour picker
In Chrome and Firefox DevTools, the colour picker in the Styles panel
shows the contrast ratio of the currently selected element. This is
useful for quickly checking specific elements in context.
WebAIM Contrast Checker
https://webaim.org/resources/contrastchecker/
Enter foreground and background hex values to calculate the contrast ratio
and see which WCAG levels pass or fail. Supports transparent colours.
TPGi Colour Contrast Analyser (CCA)
A free desktop application for Windows and macOS. Includes an eyedropper
tool to sample colours directly from any part of the screen — essential
for testing text over images, gradients, and video.
Download: https://www.tpgi.com/color-contrast-checker/
[3]
For text over complex backgrounds:
For text over images with variable backgrounds, test at multiple points
across the text and use the worst ratio as the result.
Contrast must be tested in all relevant states, not just the default state:
If the site supports dark mode, contrast must be tested independently in
both modes. A colour combination that passes in light mode may fail in
dark mode and vice versa.
Last edited Apr 7, 2026, 7:37 PM · P**** J****