File ConversionColor ConversionFree Tool
Color Contrast Checker
Calculate the real WCAG contrast ratio between two hex colors using the official relative-luminance formula, with AA/AAA pass-fail for normal and large text.
How to Use Color Contrast Checker
- 1Enter your foreground and background hex colors separated by a comma
- 2Click Convert
- 3Check the contrast ratio and AA/AAA pass/fail results
Frequently Asked Questions
Using the official WCAG 2.x relative luminance formula on both colors, then computing (lighter + 0.05) / (darker + 0.05) — the exact method browsers' own accessibility inspectors use, verified against known reference values (pure black vs. white gives exactly 21:1).
4.5:1 for AA-level normal text, 7:1 for AAA-level normal text, 3:1 for AA-level large text (18pt+/14pt+ bold), and 4.5:1 for AAA-level large text — this tool checks your ratio against all four thresholds at once.
Two hex colors separated by a comma, e.g. "#000000, #FFFFFF" — typically your text color and its background color.
No — the calculation happens entirely in your browser.
Related Tools
HEX to RGB
Convert a HEX color code (#RRGGBB) to its exact RGB(r, g, b) equivalent using standard base-16 to base-10 conversion.
RGB to HEX
Convert RGB values (0-255 per channel) to a HEX color code (#RRGGBB) using standard base-10 to base-16 conversion.
HEX to HSL
Convert a HEX color code to HSL (Hue, Saturation, Lightness) using the standard RGB-to-HSL formula.
Color Palette Generator
Generate a complementary, analogous, and triadic color palette from a base hex color using standard hue-wheel rotation math.