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

  1. Enter your values in the fields above.
  2. Press Generate to see the result.
  3. 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