WCAG AA Contrast Ratio
Calculate the contrast ratio between two colors and see if it passes WCAG AA and AAA levels. Ensure readable, accessible text on your site with approved colors.
Contraste
—
Whether your text passes the contrast test
That light gray looks great on a studio monitor and vanishes on a phone screen in daylight. The objective ruler for settling the argument is the contrast ratio. Pick two colors in the swatches, one for the text and one for the background, and the page returns something like 4.54:1 followed by the level reached: AAA, AA, AA Large or a fail. It recalculates on every change, with no button in the way.
The math is not the brightness difference your eye perceives: each RGB channel is linearized and weighted (0.2126 red, 0.7152 green, 0.0722 blue), and the ratio is the lighter luminance plus 0.05 divided by the darker one plus 0.05. Green dominates the result, which is why a vivid green like #22c55e on white lands at only 2.28:1 and fails, while a dark blue clears the bar easily. Swapping the two colors changes nothing.
The badge reports only the highest level reached, with no split by font size: 5:1 shows as AA, though on a 24px heading it would already be AAA. Note that the failing badge reads Falha, Portuguese for fail, since the widget is shared with the Portuguese page. It reads solid colors only, so gradients, transparency and background photos are out of scope. Passing contrast also does not fix color blindness on its own.
Frequently asked questions
What is the minimum contrast ratio?
What does AA Large mean?
Can I type a hex code directly?
Related Tools
WCAG Contrast Checker
Check the contrast between text and background colors per WCAG 2.1 guidelines. Shows the ratio and AA/AAA levels for normal and large text.
Image Brightness & Contrast
Adjust the brightness and contrast of any image with real-time sliders. See the result instantly and download as PNG.
Restaurant Bill Itemized
Each person picks the items they consumed; the system sums values, applies proportional service fee and shows each person's share.
CEP Lookup
Look up Brazilian postal codes (CEP) via ViaCEP API. Returns street, neighborhood, city, state and area code.
Stopwatch
Online stopwatch with hundredths precision, laps and history. Works in the browser with no installation.
Image Compressor
Compress JPEG and PNG images directly in the browser using the Canvas API. Set the target quality (1–100%) and see the size reduction in real time. No files are uploaded to servers.