Enter colors like #1e293b or #fff.
The quick brown fox 0123
Large text 18pt
Large = 18pt+ (24px) or 14pt+ bold. UI/graphics need 3:1 (AA).
WCAG 2.x relative-luminance formula. Min ratios: AA 4.5 / AAA 7 (normal), AA 3 / AAA 4.5 (large).
A color contrast checker that turns "is this text too faint to read on that background?" into a number you can trust. Enter a foreground (text) color and a background color as HEX like `#1e293b`, and it computes the contrast ratio (e.g. `4.5:1`) using the WCAG 2.x relative-luminance formula, then shows at a glance — with pass/fail chips — whether the pair meets the AA and AAA accessibility levels for both normal and large text. The thresholds are 4.5:1 (AA) and 7:1 (AAA) for normal text, and 3:1 (AA) and 4.5:1 (AAA) for large text (over 18pt ≈ 24px, or over 14pt bold); UI components and graphical objects generally need 3:1 (AA). Besides typing HEX, you can pick a color visually with the swatch picker next to each field and the box fills in reverse; three-digit shorthand like `#fff` is accepted too. A "Swap" button flips the foreground and background in one click so you can compare a light-on-dark and dark-on-light arrangement instantly. The two colors are applied to real sample text (normal and large) in a live preview, so you can judge readability with your eyes, not just the numbers. Your chosen pair is saved in your browser so the next visit starts from the same palette. Importantly, the color values you enter are never uploaded, stored, or sent to a server — all calculation happens with JavaScript entirely inside your browser, so unreleased brand colors and in-progress palettes stay on your device. Note that this tool focuses on the contrast (luminance) ratio only: it does not simulate color-vision deficiency, nor does it sample text over image or gradient backgrounds. For semi-transparent colors, convert them to the opaque blended color before entering.
How to use
- Enter a color in "Text color" and "Background" (HEX like `#1e293b`, or use the picker beside each).
- Read the contrast ratio (e.g. `4.5:1`) and the AA/AAA × normal/large pass-fail chips.
- Press "Swap" to flip light and dark and compare. Your color values are never sent anywhere.
FAQ
Are the color values I enter uploaded anywhere?
No. All contrast calculation happens with JavaScript inside your browser, and the values are never uploaded, stored, or sent to a server. Unreleased brand colors and in-progress palettes stay entirely on your device.
What is the difference between normal and large text?
WCAG defines large text as over 18pt (about 24px) or over 14pt bold, and it allows a lower contrast ratio than normal text. Normal text needs 4.5:1 (AA) / 7:1 (AAA); large text needs 3:1 (AA) / 4.5:1 (AAA).
Can I use it for buttons and icons?
Yes, as a guide. Non-text elements such as UI component boundaries and meaningful icons should reach 3:1 under WCAG AA. Use this tool's large-text column (3:1) as the reference for those.
Can it check semi-transparent (alpha) colors?
Contrast depends on the color actually shown after blending with what is behind it, so a translucent color cannot be judged accurately as-is. Convert it to the opaque blended HEX you actually see, then enter that.
If the contrast ratio passes, is it readable for everyone?
Meeting the ratio covers luminance (brightness) difference, but it does not by itself guarantee that color-blind users can distinguish the colors. For important information, don't rely on color alone — also distinguish it with shape or labels.