Color Contrast Checker
Check a text and background color pair using WCAG relative luminance. Semi-transparent text is composited over the opaque background before the ratio is calculated. The result identifies normal/large text thresholds and suggests an opaque alternative where useful.
Your result
How the calculation works
Linearize each sRGB channel, then luminance=0.2126R+0.7152G+0.0722B. Contrast=(lighter luminance+0.05)/(darker luminance+0.05). Text compositing uses opacity×foreground+(1−opacity)×background.
Worked example
Black text on white has a 21:1 ratio and passes AA and AAA normal text. #777777 on white is approximately 4.48:1, narrowly below the 4.5:1 normal-text AA requirement.
Assumptions and limitations
Accepts opaque #RGB/#RRGGBB background and a separate foreground alpha. No background image or gradient analysis. Suggested color uses sampled blends toward black/white; it is not a globally minimal perceptual edit.
Large text is at least 18 pt, or 14 pt bold. Passing contrast alone does not prove accessible labels, keyboard interaction, focus, state communication or full WCAG conformance.
Sources and editorial responsibility
Maintained by Renvoro Pty Ltd. Sources inform the methods and assumptions shown here; outputs have the limitations described on this page.
Method reviewed 2026-10-13. Calculation standards · Report an issue