Compute the contrast ratio between a text and background color and check WCAG 2.1 AA/AAA compliance
It uses the relative luminance defined by WCAG 2.1: (lighter luminance + 0.05) / (darker luminance + 0.05). All computation runs in your browser with JavaScript.
For normal text, AA requires at least 4.5:1 and AAA at least 7:1. For large text (about 18pt/24px or bold 14pt/18.66px and above), AA requires 3:1 and AAA 4.5:1. This tool shows each result separately.
No. Color input, ratio calculation, compliance check, and preview all happen in your browser. Nothing is sent to a server.