Color contrast checker

Compare two hex colors against WCAG AA text contrast thresholds.

Preview text

See how text reads against the background.

Contrast ratio

Worked example

Black (#000000) on white (#FFFFFF) has a contrast ratio of 21:1.

Method

Relative luminance is calculated from linearized sRGB. The ratio is (lighter + 0.05) divided by (darker + 0.05). AA thresholds are 4.5:1 for normal text and 3:1 for large text.

Choose an image export

Find a tool

Analytics settings

Optional Google Analytics measures tool usage. Your inputs and files stay local.