ToolHub

Color Contrast Checker

Compute the contrast ratio between text and background colors and check WCAG 2.x AA/AAA accessibility compliance. Everything runs in your browser.

Input
Output

Enter two hex colors (e.g. #333333)

FAQ

How is the ratio calculated?

Per the WCAG definition: (lighter luminance + 0.05) ÷ (darker luminance + 0.05), ranging from 1:1 (same color) to 21:1 (black on white).

What counts as large text?

Text at 18pt (~24px) or bold 14pt (~18.7px) and larger. Large text needs only 3:1 for AA and 4.5:1 for AAA.

Which color formats are supported?

#rgb and #rrggbb hex (the # is optional). Convert rgb()/hsl() values with the color converter first.

Related tools