Five explicit outcomes
The color contrast checker labels AA normal text, AAA normal text, AA large text, AAA large text, and the 3:1 interface reference separately. You do not have to remember which threshold belongs to which use.
Free WCAG 2.2 design tool
Use this color contrast checker to measure any foreground and background, read the relevant text and interface thresholds, preview a real component, and find a nearby passing color without sending your palette anywhere.
Updated July 25, 2026
color contrast checker
This color contrast checker calculates the WCAG contrast ratio from two valid HEX colors. It reports AA and AAA results for normal and large text, the 3:1 reference used for visible interface components, a live preview, and a palette matrix. The color contrast checker can also search HSB values for a nearby foreground that reaches 4.5:1 or 7:1. A passing ratio is useful evidence, but it does not certify an entire page or product.
The color contrast checker keeps the number, the visual context, and the next correction together.
The color contrast checker labels AA normal text, AAA normal text, AA large text, AAA large text, and the 3:1 interface reference separately. You do not have to remember which threshold belongs to which use.
The color contrast checker applies the pair to a heading, paragraph, button, and badge. This makes obvious mistakes easier to notice before the values move into a component library.
Add two to eight colors and the color contrast checker measures every unique pair. That exposes useful foreground/background combinations that a single-pair calculator would leave hidden.
WCAG 2.2 · HEX · HSB
Enter two HEX colors. Every result updates locally and immediately.
Pass · AA normal text
This sample uses your foreground for text, borders, and controls over the selected background.
The search keeps hue when possible, then changes HSB saturation and brightness by the smallest practical amount.
:root {
--accessible-foreground: #1F2937;
--accessible-background: #F9FAFB;
}
.your-component {
color: var(--accessible-foreground);
background: var(--accessible-background);
}Add two to eight colors. Each cell measures the row color against the column color.
| Color | 1#1F2937 | 2#F9FAFB | 3#2563EB | 4#F59E0B |
|---|---|---|---|---|
1#1F2937 | — | 14.05:1AA | 2.84:1Below 3:1 | 6.83:1AA |
2#F9FAFB | 14.05:1AA | — | 4.95:1AA | 2.06:1Below 3:1 |
3#2563EB | 2.84:1Below 3:1 | 4.95:1AA | — | 2.41:1Below 3:1 |
4#F59E0B | 6.83:1AA | 2.06:1Below 3:1 | 2.41:1Below 3:1 | — |
The color contrast checker reports the normative text thresholds and keeps the non-text 3:1 reference distinct.
| Use | Level | Minimum ratio | What it means |
|---|---|---|---|
| Normal text | AA | 4.5:1 | Text below the WCAG large-scale definition. |
| Large text | AA | 3:1 | At least 24 CSS px regular or about 18.5 CSS px bold. |
| Normal text | AAA | 7:1 | The enhanced contrast target for smaller text. |
| Large text | AAA | 4.5:1 | The enhanced target for large-scale text. |
| UI and graphics | AA | 3:1 | Required visual information against adjacent colors, with exceptions. |
Use the color contrast checker as a repeatable review, not a one-time screenshot.
Paste the actual foreground and background tokens into the color contrast checker. Do not sample an anti-aliased screenshot if the source HEX values are available. Test default, hover, active, disabled, focus, error, and selected states separately because each state can change the adjacent colors.
Use 4.5:1 for ordinary AA text and 7:1 for the AAA target. Only use the lower large-text thresholds when the rendered size and weight really qualify. For essential boundaries, icons, and state indicators, review the non-text 3:1 rule instead of treating every colored object as text.
After the color contrast checker passes, inspect the component at browser zoom, in both themes, and with real copy. Confirm focus visibility, color-independent cues, readable states, and nearby backgrounds. Automated arithmetic catches a ratio; human review catches context.
The color contrast checker linearizes sRGB and applies the WCAG luminance weights: 0.2126 red, 0.7152 green, and 0.0722 blue. It then calculates (L1 + 0.05) / (L2 + 0.05), with the lighter value in L1. Identical colors return 1:1; black and white return 21:1.
Swapping the colors does not change the ratio, but context still matters. Opacity, gradients, images, blending, and shadows can create different pixels. Composite transparency first, then enter the final solid colors in the color contrast checker.
Run these checks before accepting a color contrast checker result as release evidence.
color contrast checker: Use source HEX values instead of eyedropper samples from compressed screenshots.
color contrast checker: Check light and dark themes as separate foreground/background systems.
color contrast checker: Test default, hover, focus, active, selected, error, and disabled states.
color contrast checker: Apply 4.5:1 to ordinary AA text unless a documented exception applies.
color contrast checker: Apply 7:1 when the design requirement explicitly targets AAA normal text.
color contrast checker: Confirm that large text meets both the size and weight definition.
color contrast checker: Review essential icons, boundaries, and state indicators against 3:1.
color contrast checker: Composite transparency before entering the final visible colors.
color contrast checker: Sample the weakest area when text sits over a gradient or image.
color contrast checker: Keep a non-color cue for errors, links, selections, and status changes.
color contrast checker: Inspect keyboard focus against both focused and unfocused surroundings.
color contrast checker: Zoom the finished interface and confirm content remains usable.
color contrast checker: Test real copy because line weight and placement affect perception.
color contrast checker: Record the component, state, tokens, threshold, result, and review date.
color contrast checker: Use the palette matrix to find approved pairs, not universal combinations.
color contrast checker: Recheck ratios whenever a shared design token changes.
color contrast checker: Review high-contrast and forced-colors behavior where the product supports it.
color contrast checker: Pair automated ratios with keyboard, screen-reader, and visual review.
The color contrast checker follows the published WCAG 2.2 formula and thresholds; these official sources remain the authority.
The AA text criterion states:
The visual presentation of text and images of text has a contrast ratio of at least 4.5:1
For ordinary text, this color contrast checker uses 4.5:1 as the WCAG AA minimum and 7:1 as the AAA target. Large text uses 3:1 for AA and 4.5:1 for AAA. Required UI and graphic information generally uses 3:1 against adjacent colors.
It can pass for qualifying large text and for required non-text visual information, but it does not pass ordinary AA text. The color contrast checker shows these outcomes separately so a 3:1 result is not mistaken for a universal pass.
The color contrast checker accepts solid HEX colors. If a foreground or background is transparent, first composite it over the real underlying color and test the visible result. Gradients and images should be checked at their weakest local contrast.
The color contrast checker searches HSB saturation and brightness values while holding hue when possible. It chooses a nearby foreground that reaches the selected ratio. Review the suggestion in context because a numerical pass may still conflict with brand hierarchy or state meaning.
No. A color contrast checker verifies a mathematical relationship between selected colors. Complete accessibility also requires semantic structure, keyboard support, visible focus, useful labels, alternatives, predictable behavior, and testing of the complete page or process.