Adjust text only
Background stays unchanged.
— Check any foreground and background pair against WCAG AA and AAA, see the UI and graphics verdict, and get the smallest lightness-only fix. Everything stays in your browser.
The Contrast Checker is a free, instant WCAG contrast ratio tool for text and its background. Enter a text color and a background color to check the WCAG contrast ratio, and it tells you not just the number but whether that pairing actually passes the accessibility thresholds your design needs to meet. It is built for the moment you are picking colors and just need to know: is this readable, and is it compliant?
#222222 or use the color picker.
Contrast is measured by the official WCAG formula. Each color's red, green,
and blue channels are first converted from sRGB to linear light, then
weighted into a single relative luminance value L.
The contrast ratio is (L1 + 0.05) / (L2 + 0.05), where
L1 is the lighter color's luminance and L2 the
darker. Results run from 1:1 (two identical colors) to
21:1 (pure black on pure white). The thresholds that matter:
normal text needs 4.5:1 for AA and 7:1
for AAA; large text (about 24px, or 18.66px when bold)
needs only 3:1 for AA and 4.5:1 for AAA. Because
larger glyphs stay legible at lower contrast, the bar is relaxed for them —
and this tool judges both cases separately.
15.3:1. Passes AA and AAA for both normal and large text. A safe, high-contrast body pairing.4.48:1. Fails Normal AA (needs 4.5:1) by a hair, but passes Large AA. A classic "looks fine, barely fails" gray.3.07:1. Fails Normal AA, passes Large AA — fine for a big button label, not for body copy.Most contrast checkers hand you a ratio and a terse verdict. This one shows separate AA and AAA badges for normal and large text so you know exactly which bar you clear, adds the independent 3:1 UI and meaningful-graphics verdict, and suggests the smallest lightness-only foreground or background repair when normal text fails. It also renders a real sentence in your chosen colors so you trust your eyes as well as the math, and runs entirely in your browser — no sign-up, nothing uploaded, instant on mobile. It can even name each color you test using the shared color-naming engine. The tool's own keyboard and screen-reader friendliness is part of the point: an accessibility tool should itself be accessible. For the color side of the job, pair it with the Color Namer to identify a shade, Hex to RGB to convert codes, or Color Names to browse named colors by family.
WCAG 2.x sets the bar by conformance level and text size. For normal-size body text you need at least 4.5:1 to pass level AA and 7:1 to pass the stricter AAA. Large text — roughly 24px and up, or 18.66px and up if bold — only needs 3:1 for AA and 4.5:1 for AAA. Required visual information for UI components and meaningful graphics also needs 3:1 for AA. This checker reports all five results.
Choose Normal AA or Normal AAA. The checker keeps either your background or text color fixed, preserves the other color's HSL hue and saturation, and searches lighter and darker lightness values for a passing boundary. It shows the passing option with the smaller OKLab distance from your original. This is a smallest lightness-only repair, not a claim that the suggestion is the globally nearest color in every color space.
It follows the official WCAG formula. Each color's sRGB channels are linearized, combined into a relative luminance (L), and the ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 the darker. The result ranges from 1:1 (identical colors) to 21:1 (pure black on pure white). The tool runs this calculation live as you change either color.
AA is the level most laws, contracts, and accessibility audits require — it is the practical baseline for an accessible site. AAA is a higher bar that not all content can realistically meet, so it is treated as an enhancement rather than a hard requirement. This tool reports both so you can target AA confidently and reach for AAA where the design allows.
Low contrast makes text hard or impossible to read for people with low vision, color vision deficiencies, or anyone on a glary screen in bright sunlight. Meeting WCAG contrast is also a legal and procurement requirement in many regions (for example ADA-related guidance in the US and EN 301 549 in the EU). Good contrast simply makes a product more usable for everyone.
No. All parsing, the WCAG luminance and ratio math, and the live preview run entirely in your browser with local JavaScript. The colors you test are never uploaded, logged, or stored, and the tool keeps working offline once the page has loaded.