QCSunny Lab

WCAG Contrast CheckerWCAG 颜色对比度检查

AA needs 4.5:1 (normal text) or 3:1 (large text); AAA needs 7:1 or 4.5:1. UI components and focus rings need 3:1.AA 要求 4.5:1(正文)或 3:1(大字号);AAA 要求 7:1 或 4.5:1。界面组件与焦点框要求 3:1。

The exact WCAG 2.1 contrast ratio for a foreground/background pair, with pass/fail for every threshold: AA and AAA on normal text, AA and AAA on large text, and the 3:1 line for UI components and focus indicators.

The luminance math is the spec’s own (sRGB linearization, then the 0.2126/0.7152/0.0722 weighting), so the number matches what auditors compute.

Frequently asked questions

What counts as large text?

18.66px bold or 24px regular and above — those only need 3:1 for AA.

Does 4.5:1 guarantee readability?

It guarantees distinguishability for normal vision. Low-vision users benefit from more; aim for AAA (7:1) on body copy when you can.

中文说明

给出前景/背景组合的精确 WCAG 2.1 对比度,并对每条阈值逐一判定:正文与大字号的 AA 和 AAA,以及界面组件与焦点指示的 3:1 线。

亮度算法用的就是规范本身(sRGB 线性化后按 0.2126/0.7152/0.0722 加权),数字与审计工具一致。

常见问题

多大算大字号?

粗体 18.66px 或常规 24px 及以上——这些只需 3:1 即可过 AA。

4.5:1 就一定可读吗?

它保证正常视力的可分辨。低视力用户需要更高;正文尽量做到 AAA(7:1)。