Color & Typography

Contrast Checker

Compare any foreground and background color and see the WCAG contrast ratio with AA and AAA pass levels for normal text, large text, and UI components. Everything runs in your browser — your colors never leave the page.

Runs in your browser v1.0.0

Colors

WCAG 2.1

Hex, rgb(), rgba(), or hsl() — for example #1a1a1a or rgba(26, 26, 26, 0.8).

Transparency is blended over the page background (white) before measuring.

Preview

live

Large heading sample

The quick brown fox jumps over the lazy dog. Normal body text should stay readable against this background at the selected contrast ratio.

Button Link text

Result

WCAG 2.1
— — Enter a foreground and background color to measure contrast.

WCAG pass levels

How it works

The contrast ratio is the relative luminance difference between the two colors, calculated with the WCAG 2.1 formula (L1 + 0.05) / (L2 + 0.05). Normal text needs at least 4.5:1 for AA and 7:1 for AAA, while large text and UI components need 3:1 for AA. Alpha colors are composited before measuring, and the current colors can be shared with the page URL.