A color contrast grid takes a whole palette and scores every possible text-over-background combination against the WCAG 2.1 accessibility thresholds in a single matrix. Rather than testing one pairing at a time, you paste your brand or design-system colours once and instantly see which combinations are safe for body text, which only work at large sizes, and which fail outright.
It is built for designers and front-end developers who need to prove a palette is accessible, pick legible text colours for buttons and badges, or document the “allowed” combinations for a component library — all without sending a single colour to a server.
How it works
Paste your colours in any common format — hex such as #2563eb or the shorthand
#28e, rgb(37, 99, 235), or plain CSS names like navy and crimson — one
per line or comma-separated. The tool normalises each one to a hex value, drops
duplicates, and builds an N×N table where each row is a background and each
column is a text colour.
For every cell it computes the WCAG contrast ratio from the two colours’ relative
luminances and compares it to the four official thresholds: 4.5:1 for AA normal
text, 7:1 for AAA normal text, 3:1 for AA large text and 4.5:1 for AAA large text.
Each cell shows the exact ratio plus a green badge when it passes for normal body
text and a smaller L badge for large text. Hover any cell for a live preview of
real words rendered in that exact pairing. A summary strip counts how many of the
pairs clear AA and AAA so you can judge the palette at a glance.
Example
Suppose your palette is ink #0f172a, blue #2563eb, amber #f59e0b and white
#ffffff. The grid immediately reveals that ink on white scores about 17.8:1
(AAA everywhere), white on blue scores about 5.2:1 (passes AA for normal text),
but amber text on white only reaches roughly 1.9:1 — a clear fail you should
never use for readable text. Switching amber to a background with dark ink text
fixes it, and the matrix confirms the new pairing in real time.
| Text | Background | Ratio | Normal | Large |
|---|---|---|---|---|
#0f172a | #ffffff | 17.8:1 | AAA | AAA |
#ffffff | #2563eb | 5.2:1 | AA | AAA |
#ffffff | #16a34a | 2.8:1 | fail | fail |
#f59e0b | #ffffff | 1.9:1 | fail | fail |
Use Copy failing pairs to grab every sub-4.5:1 combination for a bug ticket, or Export CSV to drop the full scored matrix straight into your design-system documentation. Every figure is computed in your browser — nothing is uploaded or stored anywhere but this device.