Color Contrast Checker

Check WCAG contrast ratio between text and background colors. Get AA and AAA compliance status.

Developer ToolsFreeNo Signup
Color Contrast Checker
Free Tool

How to use Color Contrast Checker

Web accessibility requires sufficient contrast between text and its background so people with low vision or color vision deficiencies can read it. The WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios — failing these standards means your site is inaccessible to a significant portion of users. How to check contrast: 1. Enter your foreground (text) color and background color as HEX codes or use the color pickers. 2. The contrast ratio is calculated instantly. 3. WCAG compliance levels are shown. WCAG contrast requirements: Normal text (below 18pt / 14pt bold): WCAG AA (minimum): 4.5:1 ratio required. WCAG AAA (enhanced): 7:1 ratio required. Large text (18pt+ / 14pt+ bold): WCAG AA: 3:1 ratio required. WCAG AAA: 4.5:1 ratio required. Non-text UI components (buttons, icons, input borders): WCAG AA: 3:1 ratio against adjacent colors. How contrast ratio is calculated: Contrast ratio = (L1 + 0.05) / (L2 + 0.05) Where L1 is the relative luminance of the lighter color and L2 is the luminance of the darker color. Luminance uses the WCAG formula which accounts for how human eyes perceive different colors (green appears brighter than blue at the same numeric value). Suggested alternatives: When a color pair fails, the tool suggests adjusted colors that pass — darker text on light backgrounds or lighter text on dark backgrounds — preserving your brand colors while meeting accessibility requirements.

Frequently Asked Questions

What is WCAG and why does contrast ratio matter?

WCAG (Web Content Accessibility Guidelines) is the international standard for web accessibility, maintained by the W3C. Contrast ratio matters because approximately 8% of men and 0.5% of women have color vision deficiency, and many people have reduced visual acuity from aging, screen glare, or medical conditions. Insufficient contrast makes text difficult or impossible to read for these users. Many countries also have legal requirements for digital accessibility.

What is a contrast ratio and how is 4.5:1 calculated?

Contrast ratio compares the relative luminance of two colors. Luminance ranges from 0 (absolute black) to 1 (absolute white). The formula is (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter color's luminance and L2 is the darker one's. Black on white gives the maximum ratio of 21:1. Identical colors give 1:1. The 4.5:1 threshold for normal text represents the minimum readable contrast for most users with low vision.

My brand colors fail the contrast check. What should I do?

Adjust the shade rather than the hue. If your brand blue (#4488FF) fails against white, darken it to #0055DD or #003BBB while maintaining the blue brand identity. The tool suggests adjusted alternatives. For marketing materials (print, large graphics), low-contrast brand colors can be used for decorative elements; but body text and interactive elements (buttons, links) must meet WCAG AA as a minimum.

Does WCAG contrast apply to images and icons?

WCAG 1.4.11 (Non-Text Contrast) requires a 3:1 ratio for UI components: button borders, checkbox outlines, focus indicators, and meaningful icons. It applies to the component against its adjacent background. Purely decorative images are exempt. Text in images is subject to the same 4.5:1 rule as regular text. Icons that convey information (without text labels) need 3:1 contrast.

What is the difference between WCAG AA and AAA?

WCAG AA is the legally required standard in most jurisdictions and the minimum target for any public website. It requires 4.5:1 for normal text and 3:1 for large text. WCAG AAA (7:1 for normal, 4.5:1 for large) is the enhanced level for users with the most severe vision impairments. AAA is recommended for government services, healthcare, and sites specifically serving users with disabilities, but is not mandatory for all websites.

Recommended

Related Tools