Palette Contrast Matrix

See the contrast between every color in your palette, then inspect the pairs your design needs.

Your palette

4 of 8 colors

Use 2–8 colors. Locking protects a color from edits or removal; you can still reorder it.

Palette preview

A place for every color.

This preview uses the first color as text and the second as its background. Select a matrix cell to try another pair.

Contrast matrix

Rows are text colors; columns are backgrounds. Select a cell to see its four AA and AAA text results below.

Pass or fail uses the unrounded ratio. WCAG 2.2 · SC 1.4.3 and 1.4.6 · Opaque sRGB text pairs

Export your palette

Download CSS for color tokens, JSON to reopen the palette, or SVG for a color card. Keep labels, role notes and locks separately; these portable files leave them out.

Import palette or backup

Choose or paste version 1 palette JSON (up to 64 KiB) or a collection backup (up to 256 KiB). Confirm before replacing the workspace. A backup merges saved palettes, replacing entries with matching saved IDs.

Saved on this browser

Save up to 30 palettes in this browser. Download a backup before clearing browser data. If saving is unavailable, you can still edit and export files.

    Supported color inputs and errors →

    Compare every color pair

    Each row is a text color and each column is a background. Their intersection shows the contrast ratio. Select a cell to see its four AA and AAA text results or open the pair in the checker.

    Read the matrix

    • Create or load a palette with two to eight opaque colors.
    • Find the row for the text color and the column for its background.
    • Select their intersection to read the ratio and all four text results. Mirrored cells reverse the roles but keep the same ratio.
    • Review the combinations used in your design. On a small screen, scroll inside the matrix to reach the remaining columns.

    Why the diagonal is 1:1

    A color has no contrast with itself, so every diagonal cell is 1:1. This is expected. You only need suitable contrast for the text and background combinations used in your design.

    Match the result to the text

    A 16 px regular button label counts as normal text, even inside a tall button. A 24 px regular heading qualifies as large text. Record the size and weight with the pair so you know which result applies.

    Recheck edited colors

    Editing one swatch changes every cell in its row and column. Revisit the labels, links and backgrounds that use it before exporting. Text contrast is one part of that review; focus indicators and component boundaries need separate checks.

    Sources and further reading