Color contrast checker (WCAG 2.2)
This color contrast checker reports the WCAG 2.2 color contrast ratio from relative luminance of each sRGB colour. The lighter luminance L1 and darker L2 give (L1 + 0.05) / (L2 + 0.05). Normal-size text needs 4.5:1 for AA and 7:1 for AAA — an AA contrast checker and AAA contrast checker in one view. Large text (18pt or 14pt bold) and UI component graphics need 3:1 for AA. Use it as a text contrast checker, a foreground/background contrast checker, an accessibility color checker or a WCAG color checker before shipping UI.
Formula
L = 0.2126 R + 0.7152 G + 0.0722 B (linearised sRGB)
Contrast = (L_light + 0.05) / (L_dark + 0.05)
Pick a starting colour in Color Studio, then paste the HEX values here. Swapping foreground and background does not change the ratio, but it does change which treatment you are previewing.