How Contrast Checker works
The Contrast Checker computes the WCAG 2.x contrast ratio between a foreground and background color and reports whether the pair reaches the AA or AAA level for normal text, large text, and non-text UI components such as icons or focus outlines. Type a hex or rgb() value for each color, or pick with the swatches, and the ratio and a live text preview update instantly.
The math is the same relative-luminance formula used by the contrast section already built into the color converter tool: linearize each sRGB channel, weight them 0.2126/0.7152/0.0722 for red, green and blue, then take the ratio of the lighter to the darker luminance. Everything runs in your browser, so a client's unreleased brand palette or a password-protected design system never leaves your device.