Accessibility Contrast Matrix
WCAG contrast ratios for two colour pairs.
Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.
Accessibility Contrast Matrix
How to use this tool
- Enter your values in the fields above.
- Press Generate to see the result.
- Use Load sample to try the worked example, Copy result to copy it, or Clear to start again.
Worked example
Black (#000000) on white (#FFFFFF) gives the maximum ratio of 21.00, passing AA and AAA for normal text. Black on #767676 gives 4.62, passing AA (4.5) but not AAA (7).
What this tool does not do / Limits
This is WCAG ratio maths on the colours you entered only. It does not audit a page, check font sizes or weights, or account for images, gradients or text over photographs.
Frequently asked questions
What ratio do I need for normal text?
WCAG AA needs 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1 for normal text.
Does passing here guarantee an accessible page?
No. Contrast is one check among many; keyboard use, structure and other factors matter too.
Related tools
JSON Studio
Format, validate, minify, query and compare JSON in your browser, with precise line-and-column errors.
LiveRegex Tester
Test patterns against sample text with match highlighting, capture groups and a safe one-second timeout.
LiveSecurity Header and DNS Checker
Check HSTS, CSP and other security headers, TLS details, and DNS/email authentication records (SPF, DKIM, DMARC).
Live