WCAG Color Contrast Checker

Button Color Contrast Accessibility WCAG Checker

Check if your button colors meet WCAG contrast requirements. Test CTA button foreground and background pairs for accessibility.

100% client-side. Your data never leaves your browser.

#ffffff
#3b82f6
Contrast Ratio3.68:1
AANormalAALargeAAANormalAAALarge
APCALc 60Good
Preview

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

ButtonInput field
Suggestions
Send to:

Related Tools

Check Button Color Contrast

Buttons are the most common accessibility audit failure after color contrast in text. A button that fails contrast requirements blocks users from completing tasks, submitting forms, or navigating your application. This example tests white text (#ffffff) on a standard blue button (#3b82f6).

Why Button Contrast Is Tricky

Buttons have two separate contrast requirements that are often confused:

  1. Text contrast (SC 1.4.3): The text color inside the button must have 4.5:1 contrast against the button background color
  2. Non-text contrast (SC 1.4.11): The button’s visual boundary must have 3:1 contrast against the adjacent background (the page or card behind it)

A button can pass text contrast but fail non-text contrast, or vice versa. You need to check both.

The Blue Button Problem

Most design systems use blue as the primary button color. Here is how common blue shades perform with white text:

Button colorWhite text ratioWCAG AANotes
#3b82f6 (blue-500)4.56:1PassesBarely passes, no margin
#2563eb (blue-600)6.44:1PassesRecommended minimum
#1d4ed8 (blue-700)8.59:1PassesGood for primary CTAs
#60a5fa (blue-400)2.73:1FailsCommon mistake
#93c5fd (blue-300)1.47:1FailsNever use with white text

Button States and Contrast

Every interactive state must meet contrast requirements:

StateForegroundBackgroundRatioPass?
Default#ffffff#3b82f64.56:1AA passes
Hover#ffffff#2563eb6.44:1AA passes
Active#ffffff#1d4ed88.59:1AA passes
Disabled#94a3b8#cbd5e11.46:1Exempt
Focus ring#ffffff#1e40af10.03:1AA passes

Common Button Accessibility Mistakes

  1. Light blue with white text: Using blue-400 or blue-300 with white text fails WCAG
  2. Gradient backgrounds: A gradient that transitions from pass to fail creates inconsistent contrast
  3. Focus rings that blend: Focus indicators must be visible against both the button and the page background
  4. Icon-only buttons without labels: Missing aria-label makes the button invisible to screen readers
  5. Color as the only indicator: Disabled buttons relying solely on reduced opacity without other visual cues

How to Use

  1. Enter your button text color in the foreground field
  2. Enter your button background color in the background field
  3. Check if the ratio meets 4.5:1 for normal text or 3:1 for large text (18px bold or 24px+)
  4. Test each button state (default, hover, active, focus) separately
  5. Use the accessible color suggestions to find better combinations

Testing the Full Button Stack

Buttons rarely exist in isolation. Check every variant in your design system: primary, secondary, outline, ghost, and disabled. The CSS Gradient tool can help you generate button backgrounds, but always verify the final contrast ratio with the WCAG Contrast Checker before shipping.