Color Contrast Matrix

Compare 2–8 text and background colors in a single WCAG contrast grid. Filter passing or failing pairs, inspect exact ratios, and export the results as CSV or TSV.

Each row is a text color; each column is a background color. Filter the pairs that pass or fail the selected threshold. This matrix does not certify an entire website as WCAG compliant.

Contrast grid

Read the text colors down the rows and the backgrounds across the columns. The grid scrolls horizontally on smaller screens.

CSV/TSV exports respect the selected filter. The All option includes diagonal 1:1 cells.

Highest-contrast color pairs

Up to five unique passing pairs appear here. Open a pair in the Contrast Checker to fine-tune text and background colors.

How to read and export a contrast matrix

Enter between two and eight unique 3- or 6-digit HEX colors, such as #FFFFFF, #111827, and #2563EB. Each cell previews "Aa", displays the contrast ratio and indicates whether that text/background combination meets the selected threshold.

For WCAG 2.2, the AA minimum is 4.5:1 for regular text and 3:1 for large text. The AAA enhanced thresholds are 7:1 for regular text and 4.5:1 for large text. A 3:1 threshold also applies to certain essential non-text UI indicators and graphics under criterion 1.4.11; it does not apply automatically to every decorative border or disabled control.

Each diagonal cell compares a color with itself (1:1) and is excluded from the passing/failing summary. Both text-on-background directions are retained, since you may want to evaluate either orientation. Switching filters keeps the grid aligned; filtered-out cells display a dash. When exporting, the CSV and TSV include only the rows matching your filter. The All setting includes the diagonal cells.

Example: For a blue CTA button, compare white and dark text against the blue background. Begin with the 4.5:1 AA regular-text threshold, then inspect the full context. A passing color ratio alone does not guarantee the website meets WCAG; text size, interaction, focus states and other success criteria still matter.

Need to adjust one pair? Open the Color Contrast Checker, or preview the whole light/dark palette with the Website Color Visualizer. See the WCAG 2.2 specification for the normative criteria.

Method: WCAG 2.2 · Solid sRGB colors · Updated November 7, 2026