A website to check color contrast applies the official WCAG 2.x luminance formula to a foreground and background color pair, returning a numeric ratio on a 1:1 to 21:1 scale along with pass or fail badges for AA, AAA, normal text, large text, and UI components. The math behind every trustworthy checker is the same: each sRGB channel is linearized, combined into relative luminance with the weights 0.2126 (red), 0.7152 (green), and 0.0722 (blue), then divided as (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 the darker one. A reliable site updates the result instantly as you change either input, lets you enter hex values directly, and applies both AA (≥4.5:1 normal, ≥3:1 large) and AAA (≥7:1 normal, ≥4.5:1 large) thresholds at the same time. Anything less either skips thresholds or quietly rounds, and either flaw can ship an inaccessible design past review. Pick a website that publishes the formula it uses, explains each threshold in plain language, and runs entirely in your browser so brand palettes stay private.

website to check color contrast
Find a Website to Check Color Contrast That Passes WCAG

Signals of a Trustworthy Checker

Start by checking whether the website treats contrast as a property of two colors rather than a designer opinion. A trustworthy checker should show the exact ratio, not a vague "good," "okay," or "poor" tag, and it should update every time you nudge either input. The output should include the AA and AAA badges for normal text, large text, and non-text (UI) elements, because these are the levels audits and procurement reviews actually cite. Look for a tool that also explains why a pair fails: the WCAG AA pass for normal text sits at 4.5:1 and the large-text version at 3:1, so a banner headline and a body paragraph may legitimately pass or fail at different thresholds even when both share the same palette.

Privacy is the other non-negotiable. Many sites post form fields, dropdowns, and color pickers that send the values to a server for processing, which is fine for casual checks but a problem when you are testing brand-locked palettes. The most practical websites do everything locally in your browser, so you can paste exact brand hex codes or a design-token export without worrying about leakage. The Color Contrast Checker follows that pattern, which is one reason design teams adopt it as a daily utility. Finally, an honest site should publish the formula it uses so you can re-derive the result yourself on a napkin — that single habit separates a measurement tool from a marketing widget.

The WCAG Math Behind the Ratio

The WCAG 2.x specification defines contrast as (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are the relative luminance values of the lighter and darker color. The constants 0.05 add a small ambient-light offset so two identical colors still return 1:1 instead of an undefined divide-by-zero. Luminance, in turn, is calculated from each sRGB channel after linearization — small values are scaled by 1/12.92 and larger values are gamma-decoded with the exponent 2.4 after a 0.055 offset, mirroring the sRGB-to-XYZ curve used in broadcast and display math. The three channels are then weighted: 0.2126 × red, 0.7152 × green, and 0.0722 × blue, approximating the eye's sensitivity to green and its lower response to blue.

Maximum contrast is achieved at (1 + 0.05) / (0 + 0.05) = 21:1, which is pure white text on a pure black background. Minimum is 1:1, when the two colors share the same luminance. Thresholds then map onto this scale in a way that is easy to remember: 4.5:1 for AA normal text, 3:1 for AA large text, 3:1 for non-text content such as icons and form borders, 7:1 for AAA normal text, and 4.5:1 for AAA large text. The thresholds are not arbitrary — they were derived from empirical legibility research and have been stable across WCAG 2.0, 2.1, and 2.2. A worked example keeps the math concrete: relative luminance of pure black is 0, so the maximum ratio is (1 + 0.05) / (0 + 0.05) = 21:1, which is what you would see on a checker when one field holds #000000 and the other #ffffff.

For a deeper walk-through of the channels and constants, the practical Accessibility Contrast Ratio: Formula and Thresholds guide lays the same steps out in a single diagram. The W3C's own explanation of the rule is published under WCAG 2.1 — Contrast (Minimum), which is the only source you should trust if a vendor's calculator ever disagrees with the spec.

Check a Color Pair in Three Steps

  1. Set the foreground (text) color using the color picker or by typing a hex value like #111111.
  2. Set the background color the same way, for example #ffffff.
  3. Read the contrast ratio and the AA/AAA pass or fail badges, and adjust either color until it meets the level you need.

That three-step loop is the whole interaction: pick foreground, pick background, read the result, edit, repeat. The calculator returns a numeric ratio (such as a dark-grey-on-white pair landing around 17.75:1), and every threshold you care about — AA normal, AA large, AA non-text, AAA normal, AAA large — is shown as a separate badge so you can see at a glance which standards the pair clears. If a customer demands AAA across the board and a body paragraph is sitting at 6.4:1, the AA badge turns green and the AAA badge turns red, which is the entire decision you need to communicate back to design. Once you know which threshold failed, the fastest fix is usually to darken the foreground or lighten the background; small steps of around 5–10% in lightness often move a borderline pair across the next threshold without changing the brand feel.

Note that the website updates as you change either input, so the fastest workflow is to pick a foreground, pick a background, and adjust either color until the badges you need all turn green.

Read the Pass and Fail Badges

The single most common mistake is interpreting a passing AA badge as a passing AAA badge. They are different thresholds, and audits tend to ask for AA at minimum, with AAA only where reasonable. The table below maps each conformance level to its target and minimum ratio.

Conformance levelTargetMinimum ratio
AANormal text4.5:1
AALarge text (≥18pt, or 14pt bold)3:1
AANon-text (UI, icons, focus rings)3:1
AAANormal text7:1
AAALarge text4.5:1

A useful habit is to treat AA as a floor, not a ceiling. Body copy that lands at 4.6:1 technically passes, but on a glare-prone laptop screen or in a low-vision user's browser, it sits uncomfortably close to the line. Pushing body copy to 7:1 or higher produces noticeably more relaxed reading without changing the visual hierarchy. The same idea applies to form field borders, focus indicators, and disabled states — all are flagged at 3:1 under non-text contrast, but a real focus ring at 4.5:1 reads cleanly even when the surrounding chrome is busy.

What the Contrast Ratio Does Not Cover

The ratio is a precise measurement of luminance contrast, but it is not the whole story of readability. Hue is invisible to it: a pair of reds and greens can sit at well over 4.5:1 and still be unreadable for a viewer with red-green color vision deficiency, simply because luminance contrast is similar across the hues. That is also the reason WCAG requires that color is never the only carrier of meaning — a required field marked only with a red asterisk, a stop sign explained only by hue, or a chart legend differentiated only by palette all fail for the color-blind even when the numeric ratio is clean.

The ratio also flattens context. Gradients, semi-transparent overlays, and text laid on photographs change the effective background across the letter, so the safe answer is to test against the lightest and darkest point a glyph can sit on. Placeholder text, disabled states, and very thin decorative fonts are common failure spots because their effective weight or color drops below the threshold even when the surrounding control is fine. Anywhere the background is in motion, snap multiple checks, or pin the text to a constant backing color you can actually verify.

Finally, the calculator tells you nothing about a viewer's screen, ambient light, or eyesight. Roughly one in twelve men and one in two hundred women have some form of color vision deficiency, and a far larger share read with low vision, cataracts, or on cheap screens in bright sunlight, per the prevalence numbers that informed the WCAG research. Contrast is the floor these viewers depend on, and the math only gives the floor — what you build on top of it (typography, line height, line length, focus states) is the rest of the accessibility story.

Quick Tips for Picking Accessible Pairs

Test brand colors first, then products built on top of them. Most palettes include one hero color, one neutral, and one accent; the readable pairings are almost always the neutral background with the hero foreground, the accent against the neutral, and white or near-black against each brand color. Walk each pair through the Color Contrast Checker before any token is committed, because retrofitting accessibility into shipped CSS is much more expensive than deciding it during palette review.

Favor asymmetric lightness over balanced palettes. A muted lavender on cream looks tasteful and fails 4.5:1; a deepened lavender on cream reads with much less effort and still feels on-brand once it is darkened by 8–12% in lightness. Large, bold text needs a smaller ratio because thicker strokes are easier to read, so headings can ride at the 3:1 or 4.5:1 line while body copy needs the full 7:1. Treat those differences as a hierarchy, not a loophole, and let the WCAG AA and AAA badges tell you which slots each color can hold.

Related reading: Does Color Order Matter in a WCAG Contrast Checker?.