Verificador de contraste

Comprueba las relaciones de contraste de color WCAG AA/AAA para un diseño accesible.

The quick brown foxSmall text example — 16px
17.93:1
Contrast ratio
✓ Pass
AA — Normal textRequired: 4.5:1
✓ Pass
AA — Large text (18pt+)Required: 3:1
✓ Pass
AAA — Normal textRequired: 7:1
✓ Pass
AAA — Large text (18pt+)Required: 4.5:1
Presets

¿Qué es Verificador de contraste?

The Contrast Checker calculates the WCAG luminance contrast ratio between a foreground color and a background color, then shows whether the combination passes WCAG 2.1 accessibility guidelines at AA and AAA levels for both normal and large text. The live preview shows actual text against the background for immediate visual feedback alongside the numerical ratio.

Color contrast is one of the most important and most commonly violated accessibility requirements in web design. Approximately 300 million people worldwide have some form of color vision deficiency, and many more experience reduced contrast sensitivity due to age, cataracts, or viewing in bright sunlight. Insufficient contrast makes text difficult or impossible to read for a significant portion of your audience.

WCAG 2.1 defines four contrast thresholds: AA normal text (4.5:1), AA large text 18pt+ (3:1), AAA normal text (7:1), and AAA large text (4.5:1). Our checker evaluates all four simultaneously so you know exactly what level of compliance your color combination achieves with a single check.

Casos de uso

Aquí tienes las formas más comunes en que la gente usa Verificador de contraste todos los días.

Design Review and Compliance Checking

Before finalizing any design, check every text-on-background combination. Common failures: light gray body text on white (a trendy minimal choice that often fails AA), light-colored buttons with white text, and dark text on medium-saturation colored backgrounds. Early detection during design prevents expensive remediation after development.

Color Palette Development

When building a design system, verify that every intended text-on-background combination meets at minimum WCAG AA. Test: body text on background, headings, links, placeholder text on inputs, and disabled text. Document which combinations pass at which level so developers implement the palette with confidence.

Legal Compliance Documentation

EU Web Accessibility Directive, US Section 508, and ADA requirements mandate WCAG AA compliance for public sector and many commercial websites. The contrast checker provides instant pass/fail results for compliance documentation and pre-launch accessibility audits.

Dark Mode Implementation

Dark mode requires a separate contrast check for every color combination — colors that pass in light mode often fail in dark mode. Develop both modes in parallel with contrast checking to ensure equal accessibility in both themes.

Email Template and Newsletter Accessibility

HTML email templates render across dozens of email clients — Gmail, Apple Mail, Outlook, and mobile clients — all with different rendering engines. Text on background contrast must pass in every environment since users cannot override styles. Check every text-on-background combination in your email template before sending: body text, headlines, button text on colored CTAs, footer text on dark footers. Email accessibility failures cannot be patched after sending the way web issues can.

Mobile App and Native UI Accessibility

Mobile accessibility guidelines (iOS Human Interface Guidelines and Android Material Design guidelines) both require WCAG AA compliance for text contrast. Tap targets and labels in navigation bars, tab bars, and system UI elements must meet contrast requirements. iOS uses the WCAG contrast formula for its automatic accessibility checks. Running contrast checks on your app's color system before submitting to the App Store prevents rejection or post-launch accessibility complaints.

Ejemplos

Ejemplo 1

Body Text Check

Standard dark gray on white — verifies body copy meets AAA.

Entrada Foreground: #595959, Background: #ffffff
Salida Ratio: 7.0:1 — PASS AA and AAA (all text sizes)
Ejemplo 2

Common Fail — Trendy Light Gray on White

Light gray text on white is a popular minimal design choice that often fails accessibility requirements.

Entrada Foreground: #999999, Background: #ffffff
Salida Ratio: 2.85:1 — FAIL AA for normal text (requires 4.5:1)
Ejemplo 3

CTA Button Text Check

Check white text on a brand color button background — a frequent accessibility failure point.

Entrada Foreground: #ffffff, Background: #3B82F6 (blue-500)
Salida Ratio: 3.94:1 — FAIL AA for normal text, PASS for large text (18px+)

Verificador de contraste frente a Browser DevTools Accessibility

Our dedicated contrast checker versus browser DevTools built-in accessibility inspection.

Característica Toolorah Browser DevTools Accessibility
Check any two arbitrary colors Yes — color pickers Only elements currently in the DOM
AA and AAA results simultaneously Yes — all four thresholds AA only in most browsers
Normal vs large text thresholds Yes — both shown Yes
Shareable results Copy values and share Screenshot only
Check colors before coding Yes — design phase tool Requires element to exist in code first
No browser extension required Yes DevTools built-in, no extension needed
Suggested accessible alternative colors No Chrome suggests alternatives

Consejos para usar Verificador de contraste

  • Aim for 7:1 (AAA) for body text rather than just meeting the 4.5:1 minimum.
  • Large text (18pt / 24px regular, or 14pt / ~18.7px bold) only requires 3:1 — more color freedom for headings.
  • The "swap" button tests both color roles — foreground on background AND background on foreground.
  • WCAG also requires 3:1 contrast for UI components (form borders, focus indicators) against adjacent colors.
  • Contrast ratio alone does not fully address color blindness — also test with a color blindness simulator.

Preguntas frecuentes

What is WCAG and why does it matter?

WCAG (Web Content Accessibility Guidelines) is the international accessibility standard published by the W3C. Version 2.1 is referenced in most legal accessibility requirements worldwide: the EU Web Accessibility Directive, US Section 508 (federal websites), the UK Equality Act, and court interpretations of the Americans with Disabilities Act. WCAG AA compliance is the most commonly required level. Meeting WCAG is both a legal requirement in many contexts and an ethical responsibility to ensure your content is readable by users with visual impairments, color vision deficiencies, and age-related contrast sensitivity reduction.

How is the contrast ratio 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. Relative luminance is a perceptual measure of color brightness that weights the RGB channels by how sensitive the human eye is to each: green (72%), red (21%), blue (7%). The +0.05 offset prevents division by zero and accounts for display flare. The result ranges from 1:1 (identical colors, no contrast) to 21:1 (maximum, black on white).

What counts as "large text" for the reduced 3:1 requirement?

WCAG defines large text as 18 point (24px at standard 96dpi screen resolution) or larger at normal weight, or 14 point (~18.67px) or larger at bold weight. Text smaller than these thresholds must meet the 4.5:1 AA requirement. In practice: most body text (14-16px regular) requires 4.5:1. Large headings (24px+ regular, or 18px+ bold) only require 3:1. This distinction gives designers more color flexibility for large display type while maintaining strict requirements for body text readability.

Does passing contrast ratio mean the design is fully accessible?

Contrast ratio is necessary but not sufficient for full accessibility. Passing 4.5:1 means the color combination is legible for most users with typical vision. Additional accessibility factors include: font size (minimum 16px recommended for body text), font weight (very thin fonts are hard to read even at high contrast), line spacing (1.5× line height minimum), text density, and color blindness. The contrast checker addresses luminance contrast; test with a screen reader and color blindness simulator for comprehensive accessibility review.

What is the difference between WCAG AA and AAA compliance?

WCAG AA is the standard required by most legal frameworks and accessibility audits. For normal text: 4.5:1 minimum contrast. For large text: 3:1. WCAG AAA is the enhanced level representing the highest standard. For normal text: 7:1. For large text: 4.5:1. AAA compliance is not required by most legal frameworks but is the target for content that must be accessible to users with severe visual impairments. Many organizations aim for AA on all content and AAA on content critical for users with disabilities, such as essential instructions or medical information.

How do I check contrast for text on an image or gradient background?

The WCAG specification addresses only uniform backgrounds. For text on images or gradients, the contrast varies across the text area. Best practices: use a semi-transparent dark or light overlay between the image/gradient and the text to ensure minimum contrast everywhere, or sample the darkest/lightest background area and test that worst-case scenario. WCAG 2.2 (in development) may address this more explicitly. For critical text on complex backgrounds, always visually verify readability at small sizes and on mobile devices in addition to running the numeric check.

What is the WCAG 2.1 contrast requirement for UI components and icons?

WCAG 2.1 Success Criterion 1.4.11 (Non-text Contrast) requires a 3:1 contrast ratio for UI components and graphical objects that convey information — including form input borders, focus indicators, chart lines, icons, and button outlines. This is separate from the text contrast requirements. For example, a text input field's border must have 3:1 contrast against the background to be distinguishable. An icon that conveys meaning (not purely decorative) must also meet 3:1. The Contrast Checker's "UI components" threshold displays whether your color combination meets this requirement.