Free WCAG color contrast checker
Enter two hex colors to see WCAG AA and AAA results as you type. No account needed.
Check my colors
Use a 3- or 6-digit hex color, for example #fff or #07304A. Opaque sRGB colors only.
Contrast ratio
- Pass
AA normal text
Minimum 4.5:1
- Pass
AA large text / UI colors
Minimum 3:1
- Pass
AAA normal text
Minimum 7:1
- Pass
AAA large text
Minimum 4.5:1
Make every word easier to see.
This is a preview of your chosen colors. A color pair is only one part of an accessible interface.
Keep the result. Share the context.
Share a link to this pair or save a plain-text report for a design review. No account needed. Colors in shared links are visible to anyone you send them to.
The displayed ratio is rounded; pass/fail uses the full value. Large text is at least 18pt (24 CSS px), or 14pt (about 18.67 CSS px) bold. Test UI components against their actual adjacent colors. This check does not evaluate transparency, gradients, images, focus behavior, or full-page conformance.
Check more than contrast
Review keyboard access, forms, zoom, and more with the free worksheet.
By the ComplyWCAG team · Updated
Check your color pair
This tool evaluates two opaque sRGB colors using relative luminance. Choose the foreground and background that actually appear together. Calculations run locally; color inputs are not sent to our servers or analytics.
Read the result in context
Normal text needs 4.5:1 for WCAG AA; large text has a 3:1 threshold. AAA text thresholds are 7:1 for normal text and 4.5:1 for large text. Large text means at least 18pt, or 14pt bold.
Pass/fail is calculated before the displayed ratio is rounded. A color pair close to the minimum deserves extra care with thin fonts and real rendering. Logos and some incidental or inactive content have exceptions; consult the W3C guidance for the exact criterion.
Use examples to understand the boundary
Black on white: 21:1
#000000 on #FFFFFF has the maximum WCAG contrast ratio for opaque sRGB colors. It passes both AA and AAA text thresholds. That result says nothing about the page's labels, focus behavior, or reading order.
Gray on white: close is not a pass
#777777 on #FFFFFF displays as 4.48:1. It fails AA for normal text, even though rounding to one decimal place would make it look like 4.5. The tool uses the unrounded value for pass/fail.
Large text has a separate threshold
The same 4.48:1 pair meets the 3:1 AA threshold for large text, but not its 4.5:1 AAA threshold. Confirm the actual rendered size and weight; the large-text definition is at least 18pt regular or 14pt bold.
Gradients and transparency need more work
The two hex inputs do not model an image, alpha blending, or changing background. Identify the actual composited colors behind the text and evaluate the relevant worst-case area. Do not treat a flat-color sample as a full test of a photograph or gradient.
How the WCAG contrast formula works
The calculation starts with each red, green, and blue channel, not an average of the hex numbers. Convert an 8-bit channel to sRGB by dividing by 255, then linearize it. Combine the linear channels to get relative luminance, and compare the lighter and darker colors.
For #777777 on white, every channel is 119 / 255 = 0.466667 (rounded here for explanation). Its linearized channel and luminance are about 0.184475; white has luminance 1. The calculated ratio is about 4.478089:1, so AA normal text fails. Intermediate values shown here are explanatory; the checker does not round them before the verdict.
s = channel / 255
If s <= 0.04045:
linear = s / 12.92
Otherwise:
linear = ((s + 0.055) / 1.055) ^ 2.4
Using linearized R, G, B channels:
L = 0.2126 × R + 0.7152 × G + 0.0722 × B
ratio = (Llighter + 0.05) / (Ldarker + 0.05)
#777777 on #FFFFFF:
(1 + 0.05) / (0.1844749945… + 0.05)
= 4.478089… : 1
4.478089… < 4.5
AA normal text: FailShare a pair without losing its limitations
Copy share link saves normalized colors in the URL fragment, after #. That fragment is not part of the HTTP request to our site, and the site's analytics events do not include color values. Anyone you send the link to can read the pair; do not use a shared URL for confidential design information.
Copy result and Download report include the calculated ratio, all four text thresholds, a separate UI color-pair threshold, source links, and the scope of the test. Paste the result into a design ticket with the component, state, text size, and adjacent colors. A passing pair is evidence about that pair, not approval of the whole component or website.
Check the rest of the experience
A passing pair does not certify a page. Test hover, selected, focus, and error states against the colors actually adjacent to them. Check imagery, transparency, gradients, and controls separately. For non-text UI contrast, the pair is only one part of the criterion.
Use the checklist to review keyboard access, forms, page structure, zoom, and real tasks. Fix the source styles where contrast is inadequate, while preserving visitor choice and a usable default.
Your next step