SEO Tools
Color Contrast Grid
Test every WCAG contrast pair in your palette at once. Paste text and background colors, see AA and AAA pass or fail across a live grid.
Starting palettes
Load a starter set, then replace the colors with your design tokens. Each line is one color (or label: color).
One per line. Accepts HEX, rgb(), or hsl(). Add an optional label like brand: #1d4ed8.
5 parsed.
One per line. Same formats as text colors. Translucent colors are composited over white for the ratio.
5 parsed.
Pass threshold
Result summary
12 pass/13 failof 25 pairs at AA normal text (4.5:1)
| Background ↓ / Text → | ink#0f172a | muted#475569 | subtle#94a3b8 | inverse#ffffff | brand#1d4ed8 |
|---|---|---|---|---|---|
white#ffffff | 17.8517.85:1, Pass for AA normal text (4.5:1), text ink (#0f172a) on white (#ffffff) | 7.587.58:1, Pass for AA normal text (4.5:1), text muted (#475569) on white (#ffffff) | 2.562.56:1, Fail for AA normal text (4.5:1), text subtle (#94a3b8) on white (#ffffff) | 1.001.00:1, Fail for AA normal text (4.5:1), text inverse (#ffffff) on white (#ffffff) | 6.706.70:1, Pass for AA normal text (4.5:1), text brand (#1d4ed8) on white (#ffffff) |
surface#f8fafc | 17.0617.06:1, Pass for AA normal text (4.5:1), text ink (#0f172a) on surface (#f8fafc) | 7.247.24:1, Pass for AA normal text (4.5:1), text muted (#475569) on surface (#f8fafc) | 2.452.45:1, Fail for AA normal text (4.5:1), text subtle (#94a3b8) on surface (#f8fafc) | 1.051.05:1, Fail for AA normal text (4.5:1), text inverse (#ffffff) on surface (#f8fafc) | 6.416.41:1, Pass for AA normal text (4.5:1), text brand (#1d4ed8) on surface (#f8fafc) |
card#f1f5f9 | 16.3016.30:1, Pass for AA normal text (4.5:1), text ink (#0f172a) on card (#f1f5f9) | 6.926.92:1, Pass for AA normal text (4.5:1), text muted (#475569) on card (#f1f5f9) | 2.342.34:1, Fail for AA normal text (4.5:1), text subtle (#94a3b8) on card (#f1f5f9) | 1.101.10:1, Fail for AA normal text (4.5:1), text inverse (#ffffff) on card (#f1f5f9) | 6.126.12:1, Pass for AA normal text (4.5:1), text brand (#1d4ed8) on card (#f1f5f9) |
brand#1d4ed8 | 2.662.66:1, Fail for AA normal text (4.5:1), text ink (#0f172a) on brand (#1d4ed8) | 1.131.13:1, Fail for AA normal text (4.5:1), text muted (#475569) on brand (#1d4ed8) | 2.612.61:1, Fail for AA normal text (4.5:1), text subtle (#94a3b8) on brand (#1d4ed8) | 6.706.70:1, Pass for AA normal text (4.5:1), text inverse (#ffffff) on brand (#1d4ed8) | 1.001.00:1, Fail for AA normal text (4.5:1), text brand (#1d4ed8) on brand (#1d4ed8) |
dark#0f172a | 1.001.00:1, Fail for AA normal text (4.5:1), text ink (#0f172a) on dark (#0f172a) | 2.362.36:1, Fail for AA normal text (4.5:1), text muted (#475569) on dark (#0f172a) | 6.966.96:1, Pass for AA normal text (4.5:1), text subtle (#94a3b8) on dark (#0f172a) | 17.8517.85:1, Pass for AA normal text (4.5:1), text inverse (#ffffff) on dark (#0f172a) | 2.662.66:1, Fail for AA normal text (4.5:1), text brand (#1d4ed8) on dark (#0f172a) |
About the math
WCAG 2.1 / 2.2 ratio
Each color is converted to relative luminance with the sRGB gamma curve. Ratio is (L1 + 0.05) / (L2 + 0.05), with the lighter color on top.
Thresholds
AA normal 4.5:1, AA large 3:1, AAA normal 7:1, AAA large 4.5:1, non-text 3:1. Large text is 18pt regular or 14pt bold.
Alpha handling
Translucent colors are composited over white so the pair is opaque. Test on the real background image for an exact result.
How to use
- Pick a starting palette or paste your own. The text-colors list goes on the left and the background-colors list on the right; one color per line in HEX, rgb(), or hsl(). Add an optional label like 'brand: #1d4ed8' to name the column or row.
- Choose a pass threshold: AA normal text (4.5:1, default), AA large text (3:1), AAA normal text (7:1), AAA large text (4.5:1), or non-text and UI (3:1) for icons, borders, and focus rings.
- Read the grid. Each cell shows the contrast ratio with a Pass or Fail badge. Toggle Swatch on for a real text-on-background preview, Swatch off for a denser numeric matrix.
- Toggle Show all or Showing passes to filter out failing pairs and focus only on combinations that meet the threshold.
- Click Copy CSV for a spreadsheet-ready grid with the ratio plus PASS or FAIL in every cell, or Copy passes for a plain-text list of just the combinations that meet the threshold.
About this tool
Color Contrast Grid is the bulk version of the single-pair Color Contrast Checker, built for designers and developers who are picking text and background colors from a palette or a design token file. Paste a list of text colors on one side and a list of background colors on the other, one per line, and the tool draws a grid where every cell is the WCAG 2.1 / 2.2 contrast ratio for that pair, color-coded against your chosen threshold so the safe combinations stand out immediately. The parser accepts HEX (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb() or rgba(), and hsl() or hsla() in the same line list, and an optional 'name: value' syntax lets a design token carry a friendly label into the grid header so a column reads 'slate-100' rather than '#f1f5f9'. Threshold options cover every published WCAG level: AA normal text (4.5:1, the default), AA large text (3:1, for 18pt regular or 14pt bold and up), AAA normal text (7:1), AAA large text (4.5:1), and the non-text contrast requirement (3:1) for icons, borders, focus rings, and form controls. Each cell renders the contrast ratio, a Pass or Fail badge, and an optional sample-text preview that shows your chosen text color on the real background so you can sanity-check the legibility, not just the number. Switch to swatch-off mode for a denser numeric matrix when you are comparing dozens of pairs, or toggle Hide fails to focus only on the combinations that ship. The summary line reports how many pairs pass at the chosen threshold so you can audit a whole palette in one number. Translucent colors with alpha less than 1 are composited over white before the ratio is computed (the most common assumption for design systems that ship on light surfaces) and a warning is surfaced for any line that does not parse so a typo in a hex code does not silently drop a column. Two copy options export the result for sharing: a CSV grid with the ratio plus PASS or FAIL in every cell, ideal for pasting into a spreadsheet or a code review, and a passes-only list that reads as 'ratio:1 text on background' so a developer can paste the safe combinations straight into a tokens file. Useful for designers building light and dark palettes, design system owners auditing a token set against WCAG before shipping, frontend developers verifying that brand button colors meet AA, accessibility reviewers running a full palette audit, and anyone who has hit the limit of testing one pair at a time. Everything runs locally in your browser, so the brand colors, design tokens, and palette experiments you paste here never leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Color Contrast Checker
Check WCAG AA, AAA, and UI contrast ratios with live preview and pass or fail badges.
Open tool
SEOAccessible Color Finder
Find WCAG-compliant text or background colors for any brand color.
Open tool
SEOColor Blindness Simulator
Preview any image or color as protan, deutan, tritan, and achromatopsia viewers see it.
Open tool
GeneratorColor Palette Generator
Build complementary, analogous, triadic, and monochromatic color schemes from any HEX.
Open tool
ConverterHEX to RGB Converter
Convert HEX, RGB, RGBA, and HSL with a live preview.
Open tool
GeneratorColor Shades and Tints Generator
Build a 50 to 900 style ramp of shades and tints from a single hex color.
Open tool