Check contrast in the actual interface
Use this checker when choosing a text color for a button, comparing a link with the page background, or reviewing a pair of colors from a design handoff. It converts both sRGB colors to relative luminance and compares the lighter result with the darker result. Reversing the inputs keeps the numerical ratio the same, although a design can be easier to read with one color used as the background rather than the foreground.
Start with the exact colors that will appear on screen. Use the computed foreground and background values rather than guessing from a screenshot or relying on a palette name. If either layer has transparency, determine the actual composited color before entering it. For text on an image or gradient, take samples from several points behind the text. The lowest contrast area is more useful than an average sampled color.
The checker reports both normal and large-text AA thresholds so you can compare the same palette across roles. A shade that works for a large heading can fail when reused in smaller helper text. If the result falls just short, increase the difference in luminance and check again. Swapping one palette color for a nearby shade is often enough. The pass label uses the full precision value, which explains why a rounded display can appear to sit exactly on a threshold while still showing a fail.
Test interactive states separately. Buttons and links can change color when hovered, focused, pressed, or visited. Color contrast also does not assess whether information is conveyed by color alone, whether a keyboard user can reach a control, or whether the visible focus state is clear. Use the ratio as one part of reviewing the actual interface.
A color pair that passes for large text only
This opaque gray and white pair clears 3:1 but falls short of 4.5:1. If it is for body text, darken the foreground and test again. The verdict is based on the unrounded ratio.
#888888, #ffffff
Expected output
3.54:1 AA Normal text (4.5:1): Fail AA Large text (3:1): Pass
Common questions
- Which AA thresholds are shown?
- The tool shows 4.5:1 for normal text and 3:1 for large text, using the unrounded ratio for the result.
- Does a pass audit the entire page?
- It checks an opaque color pair. Gradients, transparency, layout, keyboard access, and other accessibility requirements need separate evaluation.
The tool processes your input in this browser. It does not upload the input itself.