Color Contrast Checker (WCAG)
Software · 2 inputs · Free
Color Contrast Checker (WCAG)
Parameters
What is this tool?
Color Contrast Checker (WCAG) helps developers with encoding, encryption and text processing. Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.
📘 Common mistakes · Worked exampleCalculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.
The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.
Last reviewed: · Methodology and sources
How is it calculated?
Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.
Inputs
| Value | Unit | Example |
|---|---|---|
| Text color | — | #1a1a1a |
| Background color | — | #ffffff |
What is this tool?
Color Contrast Checker (WCAG) helps developers with encoding, encryption and text processing. Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.
Common mistakes
- Rounding 4.48 up to 4.5. WCAG thresholds apply to the unrounded value, so a ratio that displays as 4.50:1 but is really 4.499 still fails. The tool bases its verdict on the unrounded ratio.
- Checking body text only. Link colors, placeholder text, hover and focus states, error messages and button labels are subject to the same thresholds.
- Entering a semi-transparent color as if it were solid. rgba(0, 0, 0, 0.6) is not a color on its own; work out the blended result (#666666 on white) and check that.
- Measuring a single point of text placed over an image or gradient. Check the lightest and the darkest area the text crosses; the worst value decides.
- Treating any bold text as “large text”. The 3:1 threshold applies to bold text only from 14 pt (about 18.7 px) upward.
- Forgetting icons, form field borders and chart lines. They are not text, but they need at least 3:1 against the adjacent color.
📘 How to Calculate Color Contrast Ratio (WCAG AA and AAA) →
Sources
- W3C: Understanding WCAG 2.2 SC 1.4.3 Contrast (Minimum) ↗
- W3C: Understanding WCAG 2.2 SC 1.4.6 Contrast (Enhanced) ↗
- W3C: Understanding WCAG 2.2 SC 1.4.11 Non-text Contrast ↗
- W3C: WCAG 2.2, definition of relative luminance ↗
Key terms
Frequently Asked Questions
+Color Contrast Checker (WCAG) — how is it calculated?
Calculates the contrast ratio between a text color and a background color using the WCAG 2.x relative luminance formula, and shows whether it passes AA and AAA for normal text, large text and UI components. Accepts #rgb, #rrggbb, rgb(r, g, b) and basic color names.
+Which values are required?
Text color, Background color.
+Is my data stored?
No. All calculations run in your browser; the values you enter are never sent to or stored on a server. If you press “Save”, the calculation stays only in your own browser and you can delete it at any time.
+Is it free?
Yes, all tools are free and require no sign-up.
Similar tools
Popular Tools
Free Calculators in One Place
Tax, finance, health, math and more — 500+ tools, all in one place.