Are my colors uploaded?
No. The contrast math runs in your browser; the colors are not sent to a server.
Check the WCAG 2 contrast ratio of text and background colors for AA and AAA, and get the nearest passing color with the same hue.
Loading Contrast Checker…
Loading Contrast Checker…
Contrast is the accessibility problem that design reviews catch least often, because a color pair that looks fine on a bright, calibrated monitor can be unreadable on a phone in sunlight or for someone with low vision. WCAG 2 turns that into a number: the ratio between the relative luminance of the lighter and darker color, from 1:1 (identical) to 21:1 (black on white). This checker computes that ratio exactly as the specification defines it, compares the unrounded value against every threshold — AA and AAA for normal and large text, and 3:1 for UI components — and previews the pair with real text at the size and weight you choose. When a pair fails, it doesn't just say no: it searches OKLCH lightness, keeping your hue and as much chroma as the sRGB gamut allows, for the closest color that passes, so you can fix the contrast without changing the brand color more than necessary. Links from the Color Converter and Color Palette open here with the colors already filled in.
Each color is converted to linear sRGB and its relative luminance computed as 0.2126 R + 0.7152 G + 0.0722 B. The ratio is (L1 + 0.05) / (L2 + 0.05). Pass/fail always uses the full-precision ratio; the display rounds to two decimals and warns when rounding would suggest a pass.
Alpha doesn't exist in the WCAG formula, so translucent colors are composited first: the text over the background, and a translucent background over the color you say is behind it. The preview and the ratio both use those composited colors.
The suggestion keeps hue fixed and binary-searches OKLCH lightness in both directions, gamut-mapping each candidate into sRGB. It then checks the rounded hex value itself, and picks whichever direction needs the smaller lightness change. If neither direction can reach the target, it tells you rather than suggesting a color that fails.
The optional APCA readout uses the APCA-W3 0.0.98G formula: a soft black clamp, separate exponents for dark-on-light and light-on-dark, and a result in Lc from about -108 to 106. It is labelled as a draft because WCAG 3 has not been finalised.
Short answers for the things developers usually ask before trusting a tool.
No. The contrast math runs in your browser; the colors are not sent to a server.
WCAG 2 level AA needs 4.5:1 for normal text and 3:1 for large text (SC 1.4.3). AAA needs 7:1 and 4.5:1 (SC 1.4.6). User-interface components and meaningful graphics, such as input borders and icons, need 3:1 against adjacent colors (SC 1.4.11).
At least 18 point (24 CSS pixels) at normal weight, or at least 14 point (about 18.66 CSS pixels) in bold. Enter your font size and weight and the checker applies the right threshold.
WCAG compares the exact ratio, and rounding up is not allowed. #777777 on white is 4.478:1, which fails AA. If a displayed value rounds to a threshold but the exact value is below it, the checker says so and marks it as failing.
A translucent text color is blended over the background first, as the browser draws it. A translucent background needs to know what is behind it, so the checker asks for that color (white by default) instead of guessing.
APCA (Accessible Perceptual Contrast Algorithm) is the method proposed for the WCAG 3 draft. It accounts for polarity and font weight better than the WCAG 2 ratio, but it is not a compliance standard yet. The optional Lc readout is there for comparison only.
Useful follow-ups when one conversion usually turns into three more.
Convert any CSS color between HEX, RGB, HSL, HWB, Lab, LCH, OKLab and OKLCH at once, with gamut warnings and the nearest named color.
Extract color palettes from images or build them manually. Export to CSS variables, Tailwind config, SCSS, or JSON with WCAG contrast grades.
Audit HTML for WCAG 2.1 AA accessibility violations using axe-core — critical, serious, moderate, and minor issues.
Want the background and worked examples? There's a longer write-up.
Read the Contrast Checker guide