Check Color Contrast (WCAG)

Check color contrast ratios between foreground and background colors; verify WCAG 2.1 AA and AAA compliance with live preview and one-click swap.

Evaluate color contrast ratios between any foreground and background color pair against WCAG 2.1 accessibility standards. Instantly see whether your color combination passes AA and AAA compliance levels for both normal and large text. Features live preview, color swapping, hex input, and detailed ratio display. All calculations run locally in your browser for maximum privacy and speed.

Loading...
Your data stays in your browser
Was this tool useful?
Tutorial

How to Use

1
1

Enter Your Colors

Type or paste hex color codes for both the foreground text color and the background color you want to evaluate together.

2
2

Review the Contrast Ratio

The tool instantly calculates and displays the contrast ratio between your two colors along with AA and AAA pass or fail results.

3
3

Check the Live Preview

See exactly how your text looks against the background in the live preview panel to visually confirm readability before using the colors.

4
4

Swap or Adjust Colors

Use the swap button to reverse foreground and background colors, then copy the final values to your clipboard for use in your project.

Guide

Complete Guide to Color Contrast and WCAG Compliance

Why Color Contrast Matters for Accessibility

Color contrast is one of the most fundamental aspects of web accessibility. Approximately 300 million people worldwide have color vision deficiencies, and many more experience reduced contrast sensitivity due to aging or environmental conditions. Sufficient contrast between text and background ensures content remains readable for everyone, regardless of their visual ability or the device they use.

Understanding WCAG 2.1 Contrast Levels

WCAG 2.1 defines two conformance levels for contrast; AA and AAA. Level AA requires a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text. Level AAA raises these to 7:1 and 4.5:1 respectively. Most accessibility laws reference AA as the minimum standard, while AAA is recommended for content targeting older users or those with visual impairments.

Common Contrast Mistakes in Web Design

The most frequent contrast failures involve light gray text on white backgrounds, colored text on similarly colored backgrounds, and placeholder text in form fields. Designers often prioritize aesthetics over readability, choosing subtle color differences that look elegant but fail WCAG requirements. Testing every color combination during the design phase prevents costly remediation later in development.

Best Practices for Maintaining Accessible Contrast

Build contrast checking into your design workflow by testing colors before committing them to your style guide. Use design tokens to enforce minimum contrast ratios across components. Document approved color pairings in your design system and automate contrast testing in your CI pipeline using tools like axe-core to catch regressions before they reach production environments.

Examples

Worked Examples

Example: Testing Dark Text on a Light Background

Given: Foreground color #333333 and background color #FFFFFF.

1

Step 1: Enter #333333 as the foreground color.

2

Step 2: Enter #FFFFFF as the background color.

3

Step 3: Review the contrast ratio of 12.63:1 which passes both AA and AAA for all text sizes.

Result: Contrast ratio 12.63:1; passes AA Normal, AA Large, AAA Normal, and AAA Large.

Example: Checking a Failing Color Combination

Given: Foreground color #999999 and background color #FFFFFF.

1

Step 1: Enter #999999 as the foreground color.

2

Step 2: Enter #FFFFFF as the background color.

3

Step 3: Review the contrast ratio of 2.85:1 which fails AA for normal text but may pass for large text only at AA level.

Result: Contrast ratio 2.85:1; fails AA Normal, fails AAA Normal, fails AAA Large. Needs darker foreground.

Use Cases

Use Cases

Ensuring Website Accessibility Compliance

Verify that your website color scheme meets WCAG 2.1 requirements before launching. Test every text and background combination across your design system to ensure all users, including those with visual impairments, can read your content comfortably and your site passes accessibility audits.

Designing Accessible Brand Color Palettes

When creating a brand color palette, check that primary and secondary colors maintain sufficient contrast for text readability. Designers can quickly iterate through color variations to find combinations that look visually appealing while still meeting AA or AAA compliance thresholds.

Reviewing Existing UI Components for Contrast Issues

Audit existing UI components by testing their current foreground and background colors against WCAG standards. Identify buttons, badges, alerts, and navigation elements that fail contrast requirements so you can prioritize fixes and improve accessibility across your application.

Frequently Asked Questions

?What is a good contrast ratio for text?

WCAG 2.1 requires a minimum ratio of 4.5:1 for normal text at AA level and 7:1 for AAA level. Large text needs 3:1 for AA.

?What is the difference between AA and AAA compliance?

AA is the minimum recommended standard with a 4.5:1 ratio for normal text. AAA is stricter at 7:1 and provides better readability for all users.

?What counts as large text in WCAG guidelines?

Large text is defined as 18pt or larger for regular weight, or 14pt and larger for bold weight. Large text has lower contrast requirements.

?Can I use RGB or HSL color values?

Currently the tool accepts hex color codes. Convert your RGB or HSL values to hex format before entering them into the foreground and background fields.

?How is the contrast ratio calculated?

The ratio is calculated using the relative luminance of both colors as defined by WCAG 2.1. The formula produces a value between 1:1 and 21:1.

?Is my color data private when using this tool?

Yes. All contrast calculations run entirely in your browser using JavaScript. No color data is sent to any server, ensuring complete privacy for your designs.

?Is this tool free to use?

Yes. This color contrast checker is completely free with no usage limits, no registration required, and no restrictions on how many colors you test.

?Does this tool support WCAG 2.2 or APCA?

This tool implements WCAG 2.1 contrast ratio calculations. WCAG 2.2 uses the same contrast formulas, so results are equally valid for both versions.

Help us improve

How do you like this tool?

Every tool on Kitmul is built from real user requests. Your rating and suggestions help us fix bugs, add missing features and build the tools you actually need.

Rate this tool

Tap a star to tell us how useful this tool was for you.

Suggest an improvement or report a bug

Missing a feature? Found a bug? Have an idea? Tell us and we'll look into it.

Related Tools

Recommended Reading

Recommended Books on Accessibility, Color Theory & Web Design

As an Amazon Associate we earn from qualifying purchases.

Boost Your Capabilities

Professional Products for Designers and Developers

As an Amazon Associate we earn from qualifying purchases.

Newsletter

Get Free Productivity Tips & New Tools First

Join makers and developers who care about privacy. Every issue: new tool drops, productivity hacks, and insider updates — no spam, ever.

Priority access to new tools
Unsubscribe anytime, no questions asked