Start with the visible layers
Enter 3- or 6-digit HEX colors. Use the separate opacity control for the foreground; an 8-digit HEX is deliberately rejected rather than silently dropping its alpha.
Color & Accessibility
Enter two HEX colors, set the text size and opacity, then inspect the exact ratio and five WCAG thresholds.
Selected text result: Fail · AA · Needs 4.5:1
Normal text condition · Rendered foreground: #777777
Calculated locally in your browser. Color values are not uploaded.
A design token can look fine on a mockup yet miss normal-text AA by a fraction. This color contrast checker tests the actual foreground over its background before you ship the color pair.
Use the color contrast checker when reviewing small labels, large headings, or UI graphics. Its contrast ratio calculator accounts for foreground alpha rather than treating a translucent color as opaque.
The result follows the colors your users actually see, then shows a practical adjustment.
A translucent foreground is blended with the opaque background before WCAG luminance is calculated. The color contrast checker shows that composite HEX beside the ratio, so a 50% opacity label cannot appear safer than it is.
When a color misses the chosen text threshold, see a proposed foreground change and a separate background change. Each candidate shows its own ratio; neither replaces a brand color until you apply it.
A ratio has meaning only when the rendered layer and text condition match the design.
Enter 3- or 6-digit HEX colors. Use the separate opacity control for the foreground; an 8-digit HEX is deliberately rejected rather than silently dropping its alpha.
Set the CSS pixel size and bold state. The checker treats text as large only from 24px regular or 18.67px bold; auto-check refreshes after a short pause, or you can switch to manual checking.
The displayed ratio has two decimals, but pass/fail uses the full value. Review the five thresholds, then copy a current result or preview one suggested color before applying it.
Separate the mathematical ratio from the particular WCAG condition you are testing.
Opacity from 0 to 100 percent is applied to the foreground on the chosen opaque background. The rendered HEX is visible so the calculation can be checked.
Normal and large text have different AA and AAA thresholds. A 20px regular label is still normal text, while bold text reaches the large-text threshold near 18.67px.
Normal-text AA/AAA, large-text AA/AAA, and meaningful UI graphics AA are shown together. Choosing a target changes the selected verdict and suggestions, not the underlying ratio.
Try a lighter or darker foreground or background along the current hue and saturation. A candidate is previewed first; apply and undo affect one color field at a time.
These boundaries prevent a single number from being mistaken for a page audit.
Short answers to the text, opacity, and accessibility questions people raise before publishing.
For normal text, AA needs at least 4.5:1 and AAA needs 7:1. The color contrast checker compares the full unrounded ratio, so a displayed 4.50:1 can still fail if the actual number is lower.
Normal text needs 4.5:1 for AA. Large text has a lower AA threshold of 3:1; non-text controls and informative graphics commonly use 3:1 against adjacent colors.
WCAG calls text large at 24 CSS pixels or at 14pt bold, about 18.67 CSS pixels. The font-size option chooses the applicable threshold without changing the color ratio.
The foreground is mixed with the opaque background channel by channel before luminance is measured. If opacity is zero, the text becomes the background color and the ratio is 1:1.
No. A passing pair addresses only that specific text and background condition. Semantic structure, keyboard operation, focus indicators, images, and every other color state still need review.
Found a color pair this checker misreads?
Keep this color contrast checker open while tuning a design system token or reviewing a form label.
Copy the current ratio and colors for a design review, or try a suggested pair without losing the original values.
A local WCAG 2.x color-pair calculation.