About this tool
Compare a foreground and background color to see the WCAG contrast ratio and whether it passes AA and AAA, all computed locally in your browser.
Both colors come from the browser's color pickers, so they are opaque hex colors with no alpha. Each channel is converted to linear light, luminance uses weights 0.2126, 0.7152 and 0.0722, and the ratio is the lighter luminance plus 0.05 over the darker plus 0.05.
The ratio is shown to two decimals, but if rounding would reach 3, 4.5 or 7 while the true value is just below, it is truncated, so 4.499:1 is not shown as 4.50:1 beside a Fail. The tiles test 4.5 (AA normal), 7 (AAA normal), 3 (AA large) and 4.5 (AAA large).