How to use Contrast checker
- 1
Enter two colors
Type the text color and the background color as HEX, rgb(), hsl() or oklch(), or open the round swatch to pick one.
- 2
Read the verdict
The ratio and five pass or fail rows show AA and AAA for normal and large text and the 3:1 rule for icons and borders.
- 3
Apply a fix
If a level fails, use the nearest darker or lighter text or background that passes, then copy the new value.
Limits and Pro
Free and unlimited: any number of checks, 5 WCAG 2.2 criteria per pair, 2 suggested fixes per failing level, and a grid of up to 7 colors.
About Contrast checker
This contrast checker measures how far apart two colors are in brightness using the relative-luminance formula from WCAG 2.2, the same calculation browser accessibility audits and design plugins use. The result is a ratio between 1:1 (identical) and 21:1 (black on white). Success criterion 1.4.3 asks for 4.5:1 for body text and 3:1 for large text at level AA; 1.4.6 raises that to 7:1 and 4.5:1 for AAA; 1.4.11 asks for 3:1 for meaningful non-text elements such as focus rings, input outlines and chart lines.
A live sample renders both sizes of text, an outlined button and an icon in your colors, so you can judge legibility as well as the number. Ratios are truncated to two decimals rather than rounded, because a pair at 4.496:1 does not meet a 4.5:1 requirement. When a level fails, the checker searches the OKLCH lightness of one color while keeping its hue and chroma, and proposes the nearest value that passes, for the text and the background separately.
The checker is for solid colors. It cannot evaluate text over photos or gradients, transparency, font weight rendering on a particular screen, or the newer APCA method proposed for WCAG 3, so treat a pass as the minimum and test real screens too.
Privacy
Both colors stay in this tab: the ratio, the pass and fail checks and the suggested fixes are calculated by your browser, and no color values are sent to a server or stored.