ToolPony.comDocumentation

Contrast checker

Compare two opaque colors against WCAG 2.2 contrast thresholds.

Get started

  1. Use the example values or enter your own measurements.
  2. Calculate, then copy the result or download the available details.

Example

Input

#000000 on #FFFFFF

Expected result

21:1

Try it

Good to know

The calculation runs in your browser. Use consistent units in fields with no explicit unit.

Calculation method

Contrast is (lighter luminance + 0.05) divided by (darker luminance + 0.05). Use the unrounded ratio for pass/fail. Normal text needs 4.5:1 for AA or 7:1 for AAA. Large text needs 3:1 for AA or 4.5:1 for AAA.