Colors

Enter 3 or 6 digit hex (with or without #). Examples: #000 or 000000.

Enter 3 or 6 digit hex (with or without #). Examples: #fff or ffffff.

Results

Contrast Ratio
AA Normal AA Large AAA Normal AAA Large

Text Preview

16px / Normal Normal text preview — This is how your text will look.
24px / Bold Large text preview — Bold headlines and large text.
Button
Input Field

Recommendations

Start by picking or entering colors above.

Smart Palette Generator

Enter colors in the Palette Checker below or generate palettes from your current Foreground & Background.

Enter colors in the Palette Checker below to generate palette suggestions, or click the button above to create palettes from your current Foreground & Background.

Palette Checker

Paste hex colors separated by comma, space, or new line (e.g. #111, #222, #f90, #fff). Click Test Palette to check all text/background pairs.

WCAG calculations use relative luminance (sRGB) and thresholds: AA normal 4.5:1, AA large 3:1, AAA normal 7:1, AAA large 4.5:1.

Color Contrast Checker: Your Guide to WCAG-Compliant, Accessible Color Combinations

A web-based free color contrast checker tool interface calculating a 4.72:1 ratio for WCAG AA compliance, featuring an AI smart palette generator, hex text color preview boxes, and accessibility recommendations.
ToolzGPT dynamic Color Contrast Checker featuring an automated WCAG ratio checker, smart palette generator, and live element preview for fast accessibility design audits.

What Is a Color Contrast Checker?

A color contrast checker is a tool that measures the luminance difference between two colors typically text (foreground) and its background to determine whether the combination is readable according to accessibility standards.

The tool takes your foreground and background colors and calculates a contrast ratio: a mathematical value that indicates how much brighter one color is than the other. This ratio is then validated against Web Content Accessibility Guidelines (WCAG) to confirm whether your color combination meets accessibility compliance levels.

Think of it as a quality-assurance tool for your design’s readability. Just as you might check whether text is clearly visible in print, a contrast checker ensures your digital designs remain readable for people with low vision, color blindness, or viewing on older screens.

The best contrast checkers go beyond simple pass/fail validation they show you live previews of how your colors actually appear in real-world UI elements like buttons, form fields, and links, and they suggest alternative colors if your current combination doesn’t meet standards.

Why Color Contrast Matters for Accessibility

Accessible design isn’t optional. In many jurisdictions, digital accessibility is legally required:

Failing to meet these requirements can result in costly lawsuits, fines, and reputational damage.

User Experience and Readability

Beyond legal compliance, high contrast improves the user experience for everyone:

Studies show that accessible design generally improves conversion rates, reduces bounce rates, and increases time on page benefits that extend far beyond users with disabilities.

Brand and Professional Standards

Using a contrast checker demonstrates that you care about inclusive design. It’s a signal of professionalism and attention to detail that resonates with users and stakeholders alike.

Understanding WCAG Contrast Standards

The Web Content Accessibility Guidelines (WCAG) are the international standard for web accessibility, published by the World Wide Web Consortium (W3C). These guidelines define specific contrast ratio requirements based on text size and compliance level.

WCAG color contrast checker infographic showing AA and AAA accessibility standards with 4.5:1 ratio for normal text and 3:1 ratio for large text.
Visual comparison of minimum contrast requirements (WCAG AA) vs maximum accessibility guidelines (WCAG AAA) in our color contrast checker tool.

The Two Main Compliance Levels

WCAG AA is the baseline standard required by most regulations and legal frameworks. It provides adequate accessibility for most users.

WCAG AAA is the enhanced standard that provides better accessibility for users with more severe visual impairments. While not always legally required, aiming for AAA where possible significantly improves accessibility.

Contrast Ratio Requirements

A contrast ratio is expressed as a ratio of luminance values. Here’s what you need to know:

AA Compliance (Minimum)

AAA Compliance (Enhanced)

Text / Element Type WCAG AA (Minimum) WCAG AAA (Enhanced)
Normal Text (Below 18pt / 24px) 4.5:1 7:1
Large Text (18pt+ or 14pt+ Bold) 3:1 4.5:1
UI Components & Graphics (Borders, Icons, Buttons) 3:1 3:1

Example: A 4.5:1 ratio means the lighter color is 4.5 times brighter than the darker color. Pure black (#000000) on pure white (#FFFFFF) achieves the maximum possible ratio of 21:1.

Recent Updates: WCAG 2.2 and Beyond

WCAG 2.2 (the most recent stable standard) maintains the same contrast ratios as WCAG 2.1 but adds new success criteria for focus visibility and clarifies requirements for UI components. WCAG 3.0 is in development and may introduce updated contrast requirements, though WCAG 2.1/2.2 compliance remains the current standard for most organizations.

How This Tool Works

This contrast checker uses the official WCAG relative luminance formula to calculate contrast ratios with precision and accuracy. Here’s the workflow:

The Calculation Process

  1. You input two colors: Enter your foreground (text) color and background color using hex codes, RGB values, or the color picker tool
  2. The tool calculates relative luminance: Using the WCAG formula, it determines the perceived brightness of each color
  3. Contrast ratio is computed: The tool divides the luminance of the lighter color by the luminance of the darker color, plus 0.05
  4. Results are validated: The calculated ratio is compared against AA and AAA thresholds for both normal and large text
  5. Live preview updates: Sample UI elements (buttons, text, form fields, links) instantly refresh to show your colors in real-world context
  6. Pass/fail status is displayed: You see immediate feedback on which WCAG levels your color combination meets

The calculation is deterministic and based on international accessibility standards, so the same color combination will always produce the same contrast ratio and compliance status.

What Makes This Tool Comprehensive

Beyond basic contrast checking, this tool includes:

Complete Feature Breakdown

Color Input and Selection

The tool accepts colors in multiple formats to match however you prefer to work:

Hex Code Entry — Type a six-digit hex color code (#RRGGBB). The tool normalizes input so #FFF becomes #FFFFFF automatically.

RGB Input — Some workflows use RGB notation; the tool accepts rgb(r, g, b) format.

Color Picker — Click the color swatch to open a native color picker interface. This is the fastest method if you’re choosing colors visually.

Eye Dropper — Extract the exact color from anywhere on your screen (if your browser supports the eye dropper API).

All input methods update the preview in real-time, so you see results instantly as you adjust colors.

Live Preview with Real-World UI Elements

The preview section shows your chosen colors applied to actual interface components:

This preview is crucial because it moves you beyond abstract contrast ratios into actual user experience. You can see whether your color combination truly works in a real UI context before implementing it in your actual design.

WCAG Compliance Badges

For each color combination, the tool displays pass/fail status for:

Each badge is color-coded (green for pass, red for fail) so you can instantly understand compliance at a glance.

Automatic Color Adjustment Suggestions

If your color combination doesn’t meet standards, the tool offers one-click suggestions:

These suggestions maintain visual similarity to your original choice while achieving compliance. Click a suggestion to instantly apply it.

💡 Pro-Tip for Designers: Providing accessibility compliance audits for clients? Calculate your project rates instantly with our Freelancer Hourly Rate Calculator.

Palette Generator

The palette generator creates multi-color schemes that maintain accessibility:

Input Methods:

Palette Types Generated:

Palette Testing: Once generated, the tool tests every possible color combination from your palette against WCAG standards. A summary shows you how many combinations pass AA, AAA, and fail compliance.

Color Blindness Simulation

The tool includes simulations for the three main types of color vision deficiency:

Protanopia — Red-green color blindness where red appears darker and shifts toward brown. Affects approximately 1% of males.

Deuteranopia — Red-green color blindness where greens appear more reddish. Affects approximately 1% of males.

Tritanopia — Blue-yellow color blindness where blue appears greener. Affects approximately 0.001% of the population but is important to test.

When you toggle color blindness simulation, the preview refreshes to show how your color combination appears to someone with that specific vision deficiency. This immediately reveals whether you’re relying on color alone to convey critical information (which you shouldn’t).

Design principle: Never use color alone to communicate meaning. Always pair color with pattern, icon, text label, or other non-color cues.

Color History

The tool remembers the last 10 colors you’ve tested, accessible via a convenient history panel. This saves time when iterating through similar color combinations or revisiting colors from previous sessions.

History is stored in your browser’s local storage, so it persists between sessions on the same device.

Download Accessibility Report

Generate a text-based report containing:

Reports are downloaded as .txt files with descriptive filenames (e.g., contrast-report-007BFF-FFFFFF.txt), making them easy to organize and reference in your documentation.

State Persistence and URL Parameters

The tool automatically saves your last-used color combination in browser local storage, so you resume where you left off.

Advanced users can also share specific color combinations via URL parameters:

Step-by-Step Usage Guide

Basic Contrast Check (5 seconds)

  1. Enter foreground color — Type a hex code (e.g., #007BFF), use the color picker, or paste an RGB value
  2. Enter background color — Do the same for your background
  3. View results — The contrast ratio and WCAG pass/fail badges update instantly
  4. Review the preview — See how your colors look in real UI elements
  5. Done — You now know whether your color combination meets accessibility standards

Testing Text on Image Backgrounds

Many designs overlay text on photos or images. To test this:

  1. Use the image color extraction feature — Upload the image or take a screenshot
  2. The tool extracts dominant colors from the image
  3. Test text color against each extracted color to ensure readability across all areas
  4. If text fails on any extracted color, adjust your text color or add a semi-transparent overlay

Building an Accessible Color Palette

  1. Start with a base color (your primary brand color, for example)
  2. Click “Generate Palettes from Current Colors” or enter multiple colors separated by commas
  3. Review the generated palettes — complementary, analogous, triadic, and monochromatic options appear
  4. Filter by palette type to focus on the style you prefer
  5. Check the palette summary — it shows how many combinations pass AA, AAA, and fail
  6. Click individual colors to test them as foreground/background
  7. Adjust or regenerate until you have a palette you’re happy with

Simulating Color Blindness in Your Design

  1. Set up your foreground and background colors as normal
  2. View the live preview in the standard color view
  3. Toggle color blindness simulation (Protanopia, Deuteranopia, or Tritanopia)
  4. Watch the preview update to show how your design appears to someone with that vision deficiency
  5. If the design is hard to distinguish, add non-color cues: text labels, icons, patterns, or borders
  6. Test all three types to ensure your design works across different color vision deficiencies

Exporting Your Work

  1. Once satisfied with your colors, click “Download Report”
  2. The text file saves to your computer with the full contrast analysis
  3. Share or archive the report for compliance documentation

Understanding Your Results

The Contrast Ratio

The contrast ratio is the core metric. A higher ratio means greater contrast and better readability.

Side-by-side color contrast comparison showing a poor contrast ratio of 2.06:1 failing accessibility vs a WCAG AAA compliant 7.09:1 ratio with clear UI elements text preview.
Visual comparison of UI text and button elements before and after contrast ratio optimization for WCAG accessibility compliance.

Key reference points:

You don’t need 21:1 contrast for everything; the standards are calibrated to ensure readability without requiring extreme color choices that might clash with your design.

When to Aim for AA vs. AAA

AA is sufficient if:

Aim for AAA if:

Many organizations adopt a hybrid approach: AA compliance for general content and AAA for critical elements like warnings, errors, and primary CTAs.

Interpreting the Live Preview

The preview section is your most valuable feedback mechanism. Look for:

If the preview makes you squint or second-guess whether an element is clickable, your contrast probably isn’t sufficient, even if the ratio technically passes.

Color Blindness Simulation Results

If your design looks significantly different under color blindness simulation, you’re over-relying on color alone to convey information.

Common problems:

Solutions:

Real-World Use Cases

Marketing and Ad Creative

Effective advertisements need to grab attention and communicate quickly, all while remaining accessible.

Email campaigns — Test the contrast between email text and background colors. Email clients vary in how they render CSS, so checking actual appearance is important.

Social media ads — Facebook, Instagram, and LinkedIn all have different display characteristics. Text overlays on images need sufficient contrast to remain readable on mobile devices and in users’ feeds.

Landing pages and web banners — Hero sections with text overlays, CTAs, and promotional copy all benefit from contrast checking. A button that passes AA compliance will have higher click-through rates than one that’s barely visible.

Example: A blue CTA button (#007BFF) on white (#FFFFFF) achieves 4.5:1, meeting AA standards. To reach AAA, switching to darker blue (#0056B3) raises the ratio to 7:1, improving visibility and conversion potential.

Product Design and User Interfaces

Mobile apps, software dashboards, and web applications must support users across a range of device types and lighting conditions.

Form validation messages — Error states, success confirmations, and warning messages should have sufficient contrast to be immediately visible.

Data visualization — Charts, graphs, and diagrams often use color to distinguish data series. Always pair color coding with patterns, legends, or direct labels.

Navigation menus — Active vs. inactive menu states, hover states, and focus indicators all benefit from adequate contrast.

Example: A navigation bar with dark gray text (#64748B) on light gray background (#F8FAFC) has a ratio of only 2.8:1, failing AA compliance. Switching to darker text (#0F1724) raises it to 13:1, ensuring menu items are clearly visible.

Content and Publishing

Blogs, documentation, news sites, and publishing platforms often display long-form text that users read continuously.

Body text — Sufficient contrast reduces eye strain during extended reading sessions.

Headings and emphasis — While typically larger and thus requiring lower contrast ratios, they should still maintain good visibility.

Sidebar and supplementary content — Often rendered in smaller text or muted colors; contrast checking prevents this content from becoming unreadable.

Education and Training Materials

Learning platforms, course content, and instructional materials serve audiences of varying ages and abilities.

Slide decks and presentations — Projected on various screen types and viewed from different distances; testing contrast ensures content is readable for everyone in the room.

PDF documents and print materials — While primarily digital, many educational materials are printed; contrast that works on screen may not survive printing.

Tips for Better Contrast Decisions

1. Don’t Rely on Color Alone

The most common accessibility mistake is using color as the only way to convey information. An icon, pattern, or text label should always accompany color coding.

Don’t: Use green for “available” and red for “unavailable” with only color differentiating them ✅ Do: Add an icon (✓ or •) and label text in addition to color

2. Test Under Various Lighting Conditions

Colors that are readable on a monitor in a dim office might be difficult to read on a phone in bright sunlight.

3. Consider Opacity and Overlays

Semi-transparent overlays on images (common in modern design) reduce contrast. If you’re layering text over an image:

4. Large Text Enables Larger Color Choices

WCAG allows lower contrast ratios (3:1 vs. 4.5:1) for large text because size itself aids readability. Use this to your advantage:

5. Darken Darks, Lighten Lights

If your colors fail contrast testing, the simplest adjustment is often:

6. Use the Palette Generator Strategically

Rather than manually testing every combination, generate palettes and let the tool summarize how many combinations pass compliance. This is especially useful if you’re building a design system with multiple colors.

7. Accessibility Improves at Every Level

You don’t need 21:1 contrast everywhere. WCAG compliance is the minimum baseline; every improvement beyond that is valuable. Users with low vision, older users, and users viewing on older devices all benefit from colors that exceed minimum standards.

8. Test Real Components, Not Just Isolated Text

The live preview shows actual UI components. Spend time examining how your colors look in context:

If something looks off in the preview, it probably won’t work in production either.

Common Mistakes to Avoid

1. Assuming Your Brand Colors Are Automatically Accessible

Many brands have established color palettes that may not have been designed with accessibility in mind. Don’t assume brand colors meet contrast standards test them.

Solution: Test all brand colors against likely backgrounds and adjust if necessary. Often a slightly darker or lighter shade of your brand color maintains the brand identity while achieving compliance.

2. Checking Only the Happy Path

Hover states, focus indicators, disabled states, and error states all need contrast checking. Don’t just test the default appearance.

3. Forgetting to Check Color Blindness Implications

A color combination might pass WCAG contrast testing but still be problematic for users with color blindness if you’re relying on color alone to convey meaning.

Solution: Always toggle color blindness simulation, especially for data visualization, validation states, and any interface where color is meant to communicate information.

4. Testing in Isolation Rather Than in Context

A text color might pass contrast requirements against a solid background but fail readability when overlaid on a photographic image or pattern.

Solution: Test your actual design not just isolated colors. Use the image color extraction feature to test against real backgrounds you’ll use.

5. Over-Optimizing for One WCAG Level

Some teams obsess over AAA compliance for everything, while others cut corners on critical elements. Be strategic.

Better approach: Aim for AA compliance across all content (it’s the legal baseline) and push for AAA on critical elements like warnings, errors, and CTAs.

6. Not Documenting Your Compliance Decisions

For organizations subject to accessibility audits or legal review, maintaining records of your contrast testing is important.

Solution: Download and save accessibility reports for your critical color combinations. Include them in your design system documentation or accessibility audit materials.

7. Assuming Contrast Checking Is the Only Accessibility Task

Contrast is one important piece of digital accessibility, but not the whole picture. Also consider:

Use this tool as part of a broader accessibility strategy, not as a substitute for comprehensive accessibility testing.

Color Blindness and Inclusive Design

Understanding Color Vision Deficiency

Approximately 1 in 12 men and 1 in 200 women have some form of color vision deficiency, yet most digital design tools and processes don’t adequately account for this.

Color blindness isn’t about seeing in grayscale (which is extremely rare). Instead, people with color vision deficiency struggle to distinguish certain color pairs, most commonly red and green.

The Three Main Types

A comprehensive UI dashboard comparison from a color contrast checker showing how users with color blindness see web elements like success notifications and charts, highlighting inclusive design solutions.
Color blindness user interface simulation showing why relying on a professional color contrast checker and clear text labels is essential for digital accessibility.

Protanopia (Red-Blind)

Affects approximately 1% of males. Red light is not perceived, so reds appear dark or brownish, and greens shift toward yellow or orange. These users struggle to distinguish red from green, and both appear darker than they do to people with typical vision.

Design implications: Don’t pair red and green without additional cues. A button that’s green for “proceed” and red for “stop” will be indistinguishable to someone with protanopia.

Deuteranopia (Green-Blind)

Affects approximately 1% of males. Green light is not perceived, so greens appear more reddish, and reds shift toward brown. Like protanopia, users struggle to distinguish red and green.

Design implications: Same as protanopia add icons, text, or patterns to differentiate red and green UI elements.

Tritanopia (Blue-Yellow Blind)

Affects approximately 0.001% of the population but is important to test. Blue appears more green, and yellow appears more pink or red.

Design implications: Less common than red-green deficiency, but still worth testing. Avoid pairing blue and yellow without additional visual cues.

Design Strategies for Color-Blind Users

1. Never Use Color Alone

Always pair color with another visual cue:

2. Increase Brightness Contrast

Color-blind users still see differences in brightness. Make sure your color combinations have sufficient luminance contrast (which this tool measures).

3. Use Color Blind-Friendly Palettes

Some color palettes are inherently more distinguishable to users with color blindness. Research color-blind-friendly design systems and palettes (tools and resources exist specifically for this).

4. Test With Simulations

Toggle the color blindness simulation in this tool to see how your design appears. If it becomes hard to distinguish important elements, adjust your design.

5. Involve Actual Users

If possible, test your design with actual users who have color blindness. Simulations are helpful but can’t replace real user feedback.

Inclusive Design Beyond Color

Color blindness is just one aspect of inclusive design. Also consider:

Accessible design benefits everyone by making interfaces clearer, more intuitive, and more forgiving of mistakes.

Frequently Asked Questions

What exactly is a contrast ratio?

A contrast ratio measures the relative brightness difference between two colors, using the WCAG luminance formula. It’s expressed as a ratio (e.g., 4.5:1), where the first number represents how much brighter the lighter color is compared to the darker color. Higher ratios mean greater contrast and better readability.

Is WCAG AA compliance enough, or should I aim for AAA?

WCAG AA is the minimum legally required standard in most jurisdictions and is adequate for most users. AAA compliance provides enhanced accessibility for users with more severe visual impairments but isn’t legally required in most cases. A practical approach is to aim for AA compliance across all content and push for AAA on critical elements like error messages and primary CTAs.

How often does WCAG change?

WCAG updates infrequently. WCAG 2.0 was released in 2008, WCAG 2.1 in 2018, and WCAG 2.2 in 2023. WCAG 3.0 is in development but may take several more years to finalize. Current compliance testing should use WCAG 2.1 or 2.2 standards.

Does the contrast ratio change based on device type or screen settings?

The WCAG contrast ratio calculation is deterministic—the same two colors will always produce the same ratio. However, how those colors actually appear on a user’s screen depends on device calibration, ambient lighting, and individual vision. That’s why the live preview is valuable; it shows how colors look in context, which complements the numerical ratio.

Can I use this tool to check contrast on existing websites?

While this tool is designed for comparing two colors you specify, you can use it to test colors extracted from websites. Use your browser’s color picker or the image extraction feature to sample colors from a live website and test them here.

Does this tool support opacity or transparency?

Yes. When you set opacity on a foreground color (making it semi-transparent), the calculated contrast ratio accounts for how that transparent color blends with the background. This is especially useful when testing text overlays on images or other backgrounds.

Can I save my palettes or export color combinations?

This tool downloads accessibility reports for individual color combinations. For saving and managing multiple palettes, consider complementary design tools like Coolors, Adobe Color, or color management features in design platforms like Figma or Sketch.

Is there a browser extension or API?

This tool works as a web application in any modern browser. Refer to the specific tool’s documentation for information about extensions, APIs, or additional features beyond the web interface.

What’s the difference between AA and AAA, really?

AA requires 4.5:1 for normal text; AAA requires 7:1. The difference in absolute terms seems small, but the perceptual difference is significant. AAA compliance provides notably better readability for users with low vision. For comparison, pure black on pure white is 21:1 far beyond what any standard requires.

Does large text really need less contrast?

Yes, and the research supports it. Large text is inherently more readable due to size, so WCAG allows slightly lower contrast ratios (3:1 for AA, 4.5:1 for AAA) compared to normal text. This is defined as 18pt+ or 14pt+ bold text.

What if my brand colors don’t meet contrast requirements?

You have several options:

1. Adjust the shade (darken darks, lighten lights) while maintaining brand identity
2. Use the suggested adjustments this tool provides
3. Use brand colors sparingly and pair them with colors that do meet requirements
4.Establish an accessible color palette alongside your brand colors

Many organizations maintain both a “brand” color set and an “accessible” version for digital products.

How do I handle color and contrast in dark mode?

Dark mode inverts the entire contrast paradigm. Colors that were readable on light backgrounds may fail on dark backgrounds. Test both light and dark mode versions of your design separately. This tool can check both just swap which color is foreground and which is background.

Can I rely on this tool alone for accessibility compliance?

No. Color contrast is one component of digital accessibility. Also consider text size, line height, readability, keyboard navigation, screen reader compatibility, and more. This tool is valuable for one specific aspect of accessibility, but comprehensive accessibility requires broader testing.

How does this relate to the ADA and Section 508?

The ADA (Americans with Disabilities Act) and Section 508 (U.S. federal technology accessibility requirement) both reference WCAG standards for compliance. Meeting WCAG 2.1 or 2.2 AA compliance generally satisfies these legal requirements, though specific regulations may have additional requirements beyond contrast.

If my design passes color blindness simulation, am I safe?

The simulations in this tool are accurate representations of how colors appear to users with typical color blindness. If your design is readable in the simulations and clearly distinguishable with non-color cues, it should work well for users with color vision deficiency. However, testing with actual users is always ideal.

Can I make a fully color-blind-friendly palette?

You can create a palette that works well for color-blind users by using colors with high brightness contrast and by never relying on color alone to convey meaning. However, “fully” color-blind-friendly is relative different types of color blindness see colors differently, and lighting conditions affect perception.

Is grayscale simulation the same as color blindness?

No. Grayscale is a single type of extreme color vision deficiency (complete achromatopsia), which is very rare. Most color-blind users still see color; they just struggle to distinguish certain color pairs. The simulations this tool provides are more accurate than grayscale.


Disclaimer

This tool provides accurate contrast ratio calculations based on WCAG standards. However, achieving WCAG compliance is one aspect of digital accessibility. Legal compliance may require additional accessibility testing, user research, and potentially formal accessibility audits. Users should consult accessibility standards and, where applicable, legal requirements specific to their jurisdiction and industry.