Add your input
Foreground and background color values.
See AA and AAA results for normal and large text at a glance.
Preview regular body copy and larger display text before shipping your interface.
Your work stays private in your browser while you use this tool.
Calculate the WCAG 2 contrast ratio for a foreground HEX color against a background HEX color, preview the pair, and check it against AA, AAA, large-text, and non-text UI thresholds.
Foreground and background color values.
See AA and AAA results for normal and large text at a glance.
Contrast ratio, WCAG results, and a live text preview.
Aim for at least 4.5:1 for normal body text and do not rely on color alone to convey meaning.
Check body text colors before adding them to a design system.
Compare a button label with its fill for normal- and large-text requirements.
Swap foreground and background values to confirm that the ratio is unchanged while reviewing the visual result.
Each sRGB channel is linearized using the WCAG formula, combined into relative luminance, and compared as (lighter + 0.05) / (darker + 0.05). The resulting ratio is tested against 4.5:1, 3:1, and 7:1 thresholds as appropriate.
Yes. WCAG contrast checker is free to use.
Yes. Your work stays private while you use the tool — nothing you enter is uploaded.
WCAG 2 defines large-scale text as at least 18 point, or at least 14 point when bold. The tool reports the ratio and threshold but cannot infer the rendered font size or weight of your product UI.
No. The ratio always places the lighter luminance over the darker luminance, so foreground and background order does not change the numeric result. The preview can still look different in context.