CONTRAST CHECK

Contrast checker, more accessible palettes.

Enter foreground and background colors, compute the WCAG contrast ratio, and check AA / AAA for normal and large text, with a live sample. Runs locally.

14.33 : 1
Normal text AA (≥4.5)
Pass
Normal text AAA (≥7)
Pass
Large text AA (≥3)
Pass
Large text AAA (≥4.5)
Pass
Aa 示例文字 Sample Text

How is contrast computed?

WCAG uses relative luminance: (L1+0.05)/(L2+0.05). Normal text needs ≥4.5 (AA), ≥7 (AAA); large text (≥18pt or 14pt bold) needs ≥3 (AA), ≥4.5 (AAA).

示例与注意事项Example & notes

一个例子A worked example

把正文色 #8B98AD 与背景 #080D1D 放进去,得到对比度约 6.1:1,满足 WCAG AA 的正文要求。Feed in text #8B98AD on background #080D1D: the ratio is about 6.1:1, which passes WCAG AA for body text.

注意事项Things to watch

相关问答More Q&A

为什么黑白比值正好是 21:1?Why is black-on-white exactly 21:1?

这是 WCAG 对比度公式推导出的理论上限:(1.05) / (0.05) = 21。It is the theoretical ceiling of the WCAG formula: (1.05) / (0.05) = 21.

能一次检查整套配色吗?Can I check a whole palette?

可逐组检查常用搭配;页面还提供明度扫描,直接给出达标区间与建议明度。Check pairs one by one; the page also sweeps lightness to show the passing range and a suggested value.

Further reading

觉得好用?Found it useful?