Contrast ratio
This pair meets every text and non-text threshold shown.
Free Image & Design Tool
Compare foreground and background colors against WCAG 2.2 AA and AAA requirements for normal text, large text, meaningful graphics, and user-interface indicators.
Use opaque three- or six-digit HEX colors. Results update immediately.
Example color pairs
Contrast ratio
This pair meets every text and non-text threshold shown.
Pass or fail uses the full-precision ratio, not the rounded display.
Normal text
Level AA
Requires 4.5:1
Body copy and other text below the large-text threshold.
Large text
Level AA
Requires 3:1
At least 24 px regular or about 18.66 px bold.
UI & graphics
Level AA
Requires 3:1
Meaningful component indicators and graphical objects.
Normal text
Level AAA
Requires 7:1
Enhanced contrast for text below the large-text threshold.
Large text
Level AAA
Requires 4.5:1
Enhanced contrast for qualifying large text.
Adjust the rendered size and weight to see which WCAG text threshold applies.
Classification
Normal text
Accessible color choices make content easier to read.
This preview uses the selected foreground and background. Check the actual font size, weight, states, and surrounding pixels in the final interface too.
Save the full-precision ratio, WCAG checks, and preview classification as a plain-text report.
The default dark-interface colors are ready to check.
Enter the foreground color used for text, icons, borders, or another meaningful visual, then enter the adjacent background color. The results update immediately using the WCAG 2.2 relative-luminance formula. Review the relevant AA or AAA result instead of treating one threshold as suitable for every design element.
1. Add both colors
Type a three- or six-digit HEX value, or use the browser color controls.
2. Choose the use case
Check normal text, large text, or meaningful non-text UI and graphics.
3. Preview and improve
Inspect the live examples, try a suggested foreground, then copy or export the report.
A contrast ratio ranges from 1:1 for identical luminance to 21:1 for black against white. WCAG treats the stated values as thresholds, so a ratio below a requirement fails even when a rounded display appears equal to it. This checker evaluates the unrounded result and rounds only the value presented on screen.
| Content | WCAG level | Minimum ratio | What it covers |
|---|---|---|---|
| Normal text | AA | 4.5:1 | Text below the large-text threshold |
| Large text | AA | 3:1 | At least 24 px regular or about 18.66 px bold |
| Normal text | AAA | 7:1 | Enhanced contrast for smaller text |
| Large text | AAA | 4.5:1 | Enhanced contrast for qualifying large text |
| UI and graphics | AA | 3:1 | Meaningful component indicators and graphical objects |
Large text receives a lower contrast threshold because thicker, larger letter shapes are easier to perceive. The common CSS approximations are 24 pixels for regular text or about 18.66 pixels for bold text. A large container does not make the text inside it large; the rendered font size and weight determine the classification.
The 3:1 non-text requirement applies to visual information needed to identify a control or its state and to parts of graphics required for understanding. It does not mean that every decorative border or icon on a page must meet 3:1. Test each meaningful object against the color directly adjacent to it.
A two-color checker is exact only for two opaque sRGB colors. For transparent layers, calculate or sample the final composited color. For text over an image or gradient, check the least-contrasting pixels behind the complete text area rather than a convenient average. Anti-aliasing can make thin type appear lighter than its declared CSS value, so designs close to a threshold benefit from a safety margin.
Passing contrast is one accessibility requirement, not a complete conformance result. Also review focus visibility, keyboard operation, semantics, labels, error handling, zoom, responsive layout, motion, and whether color is the only signal communicating information.
Each eight-bit sRGB channel is normalized and converted to linear light using the 0.04045 breakpoint. Relative luminance is then calculated as 0.2126 × red + 0.7152 × green + 0.0722 × blue. The final ratio is (lighter luminance + 0.05) ÷ (darker luminance + 0.05).
Review the official W3C guidance for text contrast minimums and non-text contrast. External references open in a new tab.
HEX parsing, luminance calculation, WCAG evaluation, foreground suggestions, copying, and text-report creation run locally in your browser. The colors you enter do not need to be uploaded to perform the check.
Extract exact colors or build a palette with the Color Picker & Image Palette Extractor, prepare scalable icons with the SVG Converter, optimize artwork using the Image Compressor, or verify body copy with the Readability Score Checker.
Every tool in our image suite runs in your browser — no uploads, no sign-up. Compress, convert, resize, crop, pick colors, or export SVGs.
Extract HEX, RGB, HSL and CSS colors from images. Generate color palettes and copy values instantly.
Simplify aspect ratios, calculate matching width or height, preview proportions, copy CSS, and export common pixel dimensions.
Convert SVG to PNG, JPG, WebP, and PDF at any scale. Optimize and minify SVG files. Live preview, code editor, batch convert.
Compress JPEG, PNG, WebP and GIF images online. Adjust quality, resize, convert format, and batch compress.