Color Contrast Checker

Check color contrast ratios for WCAG AA and AAA accessibility compliance with live preview

Advertisement

Preview

Normal text (14px) - The quick brown fox jumps over the lazy dog
Large text (18px bold) - The quick brown fox jumps over the lazy dog
Large text (24px regular) - The quick brown fox

Contrast Ratio

21.00:1

Excellent contrast for all text

WCAG AA Compliance

Normal Text (4.5:1)✓ Pass
Large Text (3:1)✓ Pass

WCAG AAA Compliance

Normal Text (7:1)✓ Pass
Large Text (4.5:1)✓ Pass

Common Color Pairs

📘 WCAG Guidelines

  • • AA Level: Minimum contrast for web content (4.5:1 normal, 3:1 large)
  • • AAA Level: Enhanced contrast for better accessibility (7:1 normal, 4.5:1 large)
  • • Large text: 18px+ or 14px+ bold
  • • UI components: 3:1 minimum contrast ratio

Advertisement

How to Use the Color Contrast Checker

This color contrast checker helps you ensure your text and UI elements meet WCAG (Web Content Accessibility Guidelines) accessibility standards. Simply enter your foreground (text) and background colors using the color pickers or by typing hex color codes. The tool instantly calculates the contrast ratio and shows whether your color combination passes WCAG AA and AAA standards.

The contrast ratio is calculated using the relative luminance formula defined in WCAG 2.1. A contrast ratio of 4.5:1 is the minimum for normal text to meet WCAG AA standards, while 3:1 is sufficient for large text (18px or 14px bold). For enhanced accessibility (AAA), you need 7:1 for normal text and 4.5:1 for large text.

The live preview section shows how your color combination looks with different text sizes, helping you make informed decisions about typography. You can swap colors with one click to test both light-on-dark and dark-on-light combinations. The tool also provides common preset color pairs that are known to meet WCAG standards, giving you a starting point for accessible design.

Use this tool during your design process to ensure all text, buttons, form inputs, and other UI elements have sufficient contrast. Meeting WCAG standards not only makes your site more accessible to users with visual impairments but also improves readability for all users, especially those viewing content on mobile devices in bright sunlight or on low-quality displays.

Frequently Asked Questions

What is WCAG and why does contrast matter?

WCAG (Web Content Accessibility Guidelines) are standards that ensure web content is accessible to people with disabilities. Sufficient color contrast between text and background is crucial for people with visual impairments, color blindness, or those viewing content in bright sunlight. Meeting WCAG standards ensures everyone can read your content comfortably.

What is the difference between WCAG AA and AAA?

WCAG AA is the minimum recommended standard for most websites, requiring a contrast ratio of 4.5:1 for normal text and 3:1 for large text. WCAG AAA is a higher standard requiring 7:1 for normal text and 4.5:1 for large text, providing enhanced accessibility. Most websites aim for AA compliance, while AAA is recommended for content targeting users with severe visual impairments.

What qualifies as 'large text' in WCAG guidelines?

Large text is defined as 18 pixels or larger for regular weight text, or 14 pixels or larger for bold text. Large text has lower contrast requirements (3:1 for AA, 4.5:1 for AAA) because larger characters are easier to read even with less contrast.

How do I fix low contrast issues on my website?

To fix low contrast, you can either darken the text color, lighten the background color, or both until you achieve the required ratio. Common solutions include using darker shades of gray instead of light gray text, avoiding colored text on colored backgrounds, and testing all color combinations. This tool's real-time preview helps you find compliant color pairs.

Do images and logos need to meet contrast requirements?

WCAG 2.1 requires a 3:1 contrast ratio for graphical objects and UI components (like buttons, form fields, and icons) that are essential for understanding content. However, logos and decorative images are exempt. Text within images must meet the same contrast requirements as regular text.

Can I use my brand colors and still be WCAG compliant?

Yes, you can use brand colors while maintaining WCAG compliance. The key is choosing the right combinations and using sufficient contrast. For example, if your brand color is a light blue, use it for backgrounds with dark text, or as text on white backgrounds. You can also use your brand color for accents and non-text elements while using high-contrast colors for text.