SiteTidy
Home /Tools /WCAG Contrast Matrix

WCAG Contrast Matrix

Cross-reference your entire design system palette at a glance to find accessible text-background combinations.

Contrast Matrix

Test color palettes for WCAG accessibility.

Color Palette

5 / 10 Max

Legend

Passes
Fails
Background
Foreground
#0F172A
#FFFFFF
#3B82F6
#10B981
#F59E0B
#0F172A
Aa
17.9
Aa
4.9
Aa
7.0
Aa
8.3
#FFFFFF
Aa
17.9
Aa
3.7
Aa
2.5
Aa
2.1
#3B82F6
Aa
4.9
Aa
3.7
Aa
1.4
Aa
1.7
#10B981
Aa
7.0
Aa
2.5
Aa
1.4
Aa
1.2
#F59E0B
Aa
8.3
Aa
2.1
Aa
1.7
Aa
1.2

How to use the matrix

Paste a list of your brand or UI hex colors into the input field. The tool will automatically generate a grid comparing every possible combination of background (rows) and foreground (columns) text colors.

Understanding the Results

Inside each cell, you will see text colored with the foreground color sitting on top of the background color.

  • The number represents the contrast ratio (e.g., 21.00 for black on white).
  • PASS / FAIL tags indicate whether the combination meets the selected WCAG threshold for normal body text.
  • Use the "Show only failing combinations" toggle to quickly spot inaccessible pairs in your palette.

Note: The calculations are based on the standard WCAG 2.1 algorithm for relative luminance. For normal text (14pt to 18pt), the AA threshold is 4.5:1, and the AAA threshold is 7.0:1.

Related Guides

Deepen your understanding with our expert articles.