Contrast Matrix
Analyze WCAG contrast between all colors in your palette with an NxN matrix featuring text preview, ratios, statistics and quick copy
Create a visual WCAG contrast matrix between multiple colors. Ideal for verifying the accessibility of your complete design system.
Palette Presets
Manage Colors
Contrast Matrix
| BG / FG | #FFFFFF | #000000 | #1E40AF | #DC2626 | #059669 |
|---|---|---|---|---|---|
| #FFFFFF | #FFFFFFL: 100% | Aa 21.00 AAA | Aa 8.72 AAA | Aa 4.83 AA | Aa 3.77 AA Large |
| #000000 | Aa 21.00 AAA | #000000L: 0% | Aa 2.41 Fail | Aa 4.35 AA Large | Aa 5.57 AA |
| #1E40AF | Aa 8.72 AAA | Aa 2.41 Fail | #1E40AFL: 7% | Aa 1.81 Fail | Aa 2.31 Fail |
| #DC2626 | Aa 4.83 AA | Aa 4.35 AA Large | Aa 1.81 Fail | #DC2626L: 17% | Aa 1.28 Fail |
| #059669 | Aa 3.77 AA Large | Aa 5.57 AA | Aa 2.31 Fail | Aa 1.28 Fail | #059669L: 23% |
WCAG Legend
Excellent for all text types
≥ 7:1
Valid for normal text
≥ 4.5:1
Only for large text (18pt+)
≥ 3:1
Does not meet minimum standards
< 3:1
Palette Statistics
Accessibility Score
40% combinations pass AA+
4
AAA
20%
4
AA
20%
4
AA Large
20%
8
Fail
40%
Best Contrast
Worst Contrast
How it works
The contrast matrix is the most efficient way to validate the accessibility of an entire palette. Instead of checking color pairs one by one, this tool generates an NxN table that crosses all your colors as background and text, showing the WCAG level, exact ratio and a real preview for each combination.
Tool Features
- Up to 10 simultaneous colors: Add colors with picker or by typing HEX directly
- Automatic NxN matrix: Every color is crossed against all others as background/text
- Real text preview: Each cell shows "Aa" with the actual background and text colors
- Exact contrast ratio: Precise numeric value (e.g. 4.53) for each combination
- WCAG badges per cell: AAA (≥7:1), AA (≥4.5:1), AA Large (≥3:1) or Fail
- Click to copy ratio: Click any cell to copy the ratio to clipboard
- Global statistics: Count and percentage of AAA, AA, AA Large and Fail combinations
- Visual WCAG legend: Quick reference for what each level and color means
- Live editing: Modify any color and the matrix recalculates instantly
- Default starter colors: White, black and 3 common colors to get started quickly
How to Read the Matrix
Rows represent the background color (BG) and columns the foreground/text color (FG). Each cell shows how that text looks on that background:
- Green (AAA ≥ 7:1): Excellent contrast. Valid for any text size, including small text. The highest readability level.
- Lime (AA ≥ 4.5:1): Good contrast. The minimum recommended by WCAG for normal text (≥14px). Most websites should meet at least this level.
- Yellow (AA Large ≥ 3:1): Only for large text (≥24px or ≥18.5px bold). Also valid for icons, input borders and focus states.
- Red (Fail < 3:1): Doesn't meet any WCAG standard. Avoid this combination for any functional content.
Matrix vs Individual Calculator: When to Use Each?
- Contrast matrix: When you need to validate a full palette (3-10 colors) and see all possible combinations at a glance. Ideal for audits, design systems and branding validation.
- Contrast calculator: When you need to analyze a specific pair in detail — with APCA, auto-suggestion, UI component preview and multi-format. Ideal for fine-tuning.
WCAG 2.1 Standards — Quick Reference
The WCAG (Web Content Accessibility Guidelines) define minimum contrast requirements for web content to be readable by people with low vision or color blindness:
- Normal text (≤23px): Minimum 4.5:1 (AA) — recommended 7:1 (AAA)
- Large text (≥24px or ≥18.5px bold): Minimum 3:1 (AA) — recommended 4.5:1 (AAA)
- UI components (icons, borders): Minimum 3:1 against adjacent background
- Decorative text or logos: No contrast requirement
💡 Practical Use Cases
Case 1: Validate brand palette
Your brand has 5 corporate colors. You need to know which text/background combinations are accessible.
→ Load your 5 colors + white and black (7 total)
→ The matrix generates 42 combinations automatically
→ Green/lime cells are safe for text on your website
→ Statistics show your palette's compliance percentage
Case 2: Document design system
Your team needs a reference of which colors can be combined in the design system.
→ Load your system colors (primary, secondary, neutrals, alerts)
→ Take a screenshot of the matrix as visual reference
→ Include in documentation: "only use AA or higher combinations"
→ Check statistics: a good system has ≥60% valid combinations
Case 3: Web accessibility audit
You need to audit the current colors of an existing website.
→ Extract the main colors from your CSS (background, text, buttons, links, alerts)
→ Load them all into the matrix
→ Identify red combinations — those are the ones you need to fix
→ Adjust individual colors and watch ratios change in real time
Case 4: Evaluate generated palette
You generated a palette with our generator and want to verify its accessibility.
→ Copy colors from your generated palette
→ Paste them into the matrix along with white and black
→ If the Fail percentage is high, adjust the palette toward more contrast
→ An accessible palette should have ≤20% Fail combinations
Case 5: Dark mode vs light mode
Compare your palette's accessibility in both themes.
→ First: load text colors + light backgrounds → note statistics
→ Then: load text colors + dark backgrounds → note statistics
→ Compare AAA/AA percentages between both modes
→ It's common for dark mode to have worse contrast — adjust if needed