Contrast Checker
Check color contrast for accessibility.
Foreground (Text)
Pasting an 8 digit HEX like #00000080 moves its alpha here. The background stays opaque.
Background
Contrast Ratio
Preview
Large Text
Normal text sample.
WCAG Compliance
APCA Lc Value
A newer perceptual contrast method. It isn't part of any WCAG standard, so the WCAG 2.2 levels above are still the test for conformance.
A negative Lc means light text on a dark background. Unlike the WCAG ratio, Lc changes when you swap the colors, so check again after a swap. Why APCA
Suggested Colors
Find the closest color that reaches a contrast target.
Meets AA Normal and AAA Large.
The background stays as it is.
This pair reaches 4.5:1. Nothing to change.
Suggestions keep the OKLCH hue and change the lightness, with less chroma only where sRGB runs out. Closest means the smallest OKLab distance from your color. One passing pair doesn't make a page accessible, so check every place these colors meet.
How to use this tool
Enter the foreground color
Type a hex code (like #1F2937) into the foreground field or use the color picker. This is the color of your text, icon, or UI element.
Enter the background color
Type a hex code into the background field or use the picker. This is the surface the foreground sits on. Swapping the two keeps the WCAG ratio the same but changes the APCA Lc value, so check light and dark themes as separate pairs.
Read the contrast ratio
The calculator returns the exact WCAG 2.2 contrast ratio (like 4.52:1 or 7.1:1) computed from the sRGB luminance of both colors. The live preview pane shows how the pairing actually looks on screen.
Check AA and AAA compliance
The result shows pass/fail for AA normal text (4.5:1), AA large text (3:1), AAA normal text (7:1), and AAA large text (4.5:1). If a tier fails, pick that target under Suggested Colors and apply the nearest text or background color that passes.
Compare with the APCA Lc value
Under the WCAG results, the APCA Lc value gives a second opinion on readability. A minus sign means light text on a dark background. It isn't part of any WCAG standard, so it never changes the pass or fail result. APCA suggests Lc 75 as the minimum for body text and Lc 60 for other text people read.
About this tool
The Contrast Checker calculates the WCAG 2.2 contrast ratio between two colors and shows whether the pairing passes at AA, AAA, or neither. Paste a foreground and background hex value (or use the pickers) to get the exact ratio, like 4.52:1 or 7.1:1, plus a pass/fail for normal text and large text at both levels. A live preview shows how the combination looks, so you're not judging by the number alone.
Use it whenever you pick text colors, link styles, button backgrounds, or error messages. Mid-gray text on white is easy to misjudge by eye, and the checker gives you a measured ratio you can cite in an accessibility audit or legal review.
WCAG thresholds
AA requires 4.5:1 for body text and 3:1 for large text (18pt+, or 14pt+ bold). AAA requires 7:1 and 4.5:1 respectively. Non-text UI (icons, borders, focus rings that carry meaning) needs 3:1 against its adjacent background under SC 1.4.11.
APCA Lc value
Below the WCAG results, the checker also shows an APCA Lc value. APCA is a newer contrast method that weighs the text color and the background color differently, so it can flag light text on a dark background that passes the WCAG 2 ratio and is still hard to read. A minus sign means light text on dark, and the score changes when you swap the colors. It isn't part of any WCAG standard, so treat it as a second opinion. WCAG 2.2 decides pass or fail. APCA suggests Lc 75 as the minimum for body text, Lc 60 for other text people read and Lc 45 for large headlines.
Suggested colors
When a pair fails, the Suggested Colors card finds the nearest text or background color that reaches 3:1, 4.5:1 or 7:1. It keeps the OKLCH hue and moves only the lightness, so a brand blue stays blue. Where sRGB can't show that hue at the new lightness, the color gets less vivid, and the card tells you. Each suggestion is measured with the same formula as the main ratio, see-through text included, and Apply changes only the color you picked. Undo puts the old one back.
When to use it
Run every text and button color through it before shipping, especially for brand-heavy palettes where muted tints on tinted backgrounds can slip under AA. Pair with the Color Picker to dial in the exact hue or lightness adjustment needed to cross the threshold without changing the brand feel.
Popular contrast scenarios
Pre-computed contrast ratios and accessibility guidance for the most common WCAG questions.
Frequently asked questions
What is a WCAG AA contrast ratio?
What's the difference between WCAG AA and AAA?
How do I check the contrast of my brand colors?
Does white text on yellow fail WCAG?
What is contrast ratio and how is it calculated?
Do I need to pass WCAG for icons and logos?
What is the APCA Lc value?
Related tools
Color Picker
Pick colors, convert between HEX, RGB, HSL, HSV, OKLCH and CMYK, and find the nearest CSS and Tailwind color.
Use toolPPI & Retina Calculator
Calculate PPI and Retina distance for your display.
Use toolScreen Size Visualizer
Compare screen sizes side-by-side to visualize physical dimension differences.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolUse this tool on your own site
Drop the Contrast Ratio Checker into your blog, docs, or CMS with one iframe snippet. Free, no signup. See all embeddable tools