Menu

Contrast Fixer

Paste your foreground and background colors. This tool doesn't just check contrast — it automatically fixes it. One click to WCAG AA or AAA, preserving your hue while adjusting lightness.

Live Preview 4.54 : 1

Accessible by design

This is how your text will actually look on the background. The ratio updates live as you adjust colors or apply a fix.

Small text (12px) — this is the most demanding size for contrast.

Sample Button
Click any option to apply

Manual Nudge

4.54:1
46%
100%
Criterion Required Your Ratio Result
Copy Fixed Colors
✓ Copied!
01
CONTRAST FIXER

What Is a Contrast Fixer (and How Is It Different From a Checker)?

A contrast checker tells you whether two colors pass WCAG contrast requirements. It gives you a number — 3.2:1, 4.1:1, 6.8:1 — and a pass or fail badge. It's useful, but it doesn't help you actually fix the problem.

A Contrast Fixer goes one step further. It reads your foreground and background colors, detects that contrast is failing, and then automatically computes a corrected version of those colors that passes your target level. It adjusts lightness while preserving your original hue and saturation — so your brand color stays recognisable, not washed out or turned grey.

This is the difference between a smoke alarm and a fire extinguisher. A checker tells you there's a problem; a fixer solves it. For designers, developers, and accessibility teams shipping real products, the fixer is what saves the hours of manual lightening/darkening to find the "magic" hex that passes.

Simple idea: Paste your colors → click a fix option → get WCAG-compliant colors → copy the HEX. Total time: under 5 seconds.
02
WCAG LEVELS

Understanding AA, AAA, Large Text, and UI Contrast

WCAG 2.1 defines four contrast thresholds that every site should meet:

LevelRequired RatioApplies To
AA — Normal text4.5 : 1Body text under 18pt (24px) or 14pt (18.66px) bold
AA — Large text3.0 : 1Headings 18pt+ or 14pt+ bold
AAA — Normal text7.0 : 1Enhanced accessibility for low-vision users
AAA — Large text4.5 : 1Enhanced accessibility for large text
UI Components3.0 : 1Buttons, form fields, focus rings, icons

For most public websites, AA Normal (4.5:1) is the legal minimum under the ADA (in the US), the EAA (in the EU), and the UK Equality Act. AAA (7:1) is a stricter enhancement that improves readability significantly for older users and low-vision users — worth targeting for medical, government, and financial sites.

This tool lets you pick any of these as your fix target, so the corrected colors always match your actual accessibility requirements — not a generic "make it pass AA."

03
HOW THE FIX WORKS

Three Auto-Fix Strategies

The fixer offers three different strategies, each appropriate for a different situation:

🌑 Darken Foreground

Keeps your text color in the same hue family, but darkens it until the ratio passes. Ideal for body text on light backgrounds — preserves the visual identity of your text color.

☀️ Adjust Background

Keeps your text color exactly the same, but lightens or darkens the background until the ratio passes. Ideal when the text color is fixed (brand requirement) and the background is flexible.

🎯 Smart Auto

Computes both options and picks whichever requires the smallest change. Best when you want an imperceptible fix that satisfies WCAG without you noticing it happened.

Under the hood, the fixer converts your colors to HSL, then binary-searches the lightness value (keeping hue and saturation fixed) until the contrast ratio meets the target. This preserves color identity — your brand red stays red, just darker, instead of becoming brown or grey.

Why not just use black and white? Because black on white is a devastating fix for brand consistency. A brand-red button turning into pure black text is a brand violation. The fixer keeps your hue — you get accessibility and brand fidelity.
04
APCA

What Is APCA — and Why It's the Future of Contrast

WCAG 2.1 contrast ratios use a formula based on relative luminance (how much light a color emits). It's a fixed threshold for every color combination. The problem: the formula treats dark-on-light and light-on-dark as symmetric, which they're not in real perception. Human eyes perceive contrast differently depending on polarity.

APCA (Accessible Perceptual Contrast Algorithm) is the contrast model being developed for WCAG 3.0. It uses a perceptual lightness calculation (not raw luminance) and accounts for:

  • The asymmetry of dark-on-light vs. light-on-dark contrast
  • Font weight and size
  • How the human visual system actually processes brightness

APCA produces values on a different scale (roughly 0–106) with different thresholds:

APCA LcUse For
Lc 90Body text — full accessibility
Lc 75Body text — minimum for web content
Lc 60Headlines, large bold text (24px+)
Lc 45Headlines (36px+), UI components
Lc 30Fluent text — large, high-contrast UI
Lc 15Non-text elements, decorative

Your fixed colors are automatically checked against APCA in the WCAG table — so you know they'll pass today's standard (WCAG 2.1) and tomorrow's (WCAG 3.0). You can explore more perceptual color tools on APCA Contrast Checker.

05
REAL-WORLD SCENARIOS

When You'll Actually Need This Tool

🚀 Launching a site

Your brand palette was designed for print, but body text on white fails at 4.2:1. The fixer nudges the brand blue 12% darker — passes AA — brand still looks intact.

🎨 Redesigning a UI

You picked a trendy pastel background but the text needs to stay dark. The fixer computes a background shade that's close to your design but passes with the fixed text.

📊 Building a dashboard

Chart labels use a warm grey on white that fails AAA. The fixer darkens the grey slightly — visually identical, but now 7.1:1 for full AAA compliance.

🏢 Government or medical site

Legal requirements demand AAA everywhere. The fixer iteratively adjusts every color combination in your design system until all pass.

📱 Dark mode migration

Light-mode buttons become unreadable in dark mode. The fixer gives you the same brand color at a lightness that works on a dark background.

♿ Accessibility audit

A client reports "text is hard to read." The fixer quickly shows you 3 compliant alternatives per failing pair — an instant remediation report.

06
BEST PRACTICES

Accessibility Contrast Best Practices

  • Target AA Normal (4.5:1) as the default. It's the legal minimum in the EU, UK, and US — and the readability floor for most users.
  • Use AAA (7:1) for critical content. Medical, financial, and legal text should aim for AAA. The extra contrast is worth the visual compromise.
  • Don't rely on color alone. A red error message that passes contrast is still invisible to colour-blind users if red is the only signal. Add an icon or text label.
  • Check UI components too. Buttons, form field borders, focus rings, and icons need 3:1 against their surroundings — a separate requirement from text.
  • Test at real size. Contrast that passes for 24px text may feel too low at 12px. Always preview at the actual font size your users will see.
  • Preserve your brand hue. This tool keeps your hue and saturation while fixing lightness — you get accessibility and brand consistency, not one or the other.
08
FREQUENTLY ASKED QUESTIONS

Contrast Fixer FAQ

What's the difference between a Contrast Checker and a Contrast Fixer?

A checker tells you whether your colors pass or fail WCAG. A fixer automatically computes compliant colors that preserve your hue and saturation. Checkers diagnose; fixers remediate.

How does the auto-fix work?

The tool converts your foreground and background colors to HSL, then binary-searches the lightness value (keeping hue and saturation fixed) until the contrast ratio meets your target (AA, AA Large, or AAA). Three strategies are offered: darken FG, adjust BG, or smart-auto (whichever needs less change).

Will the fixed colors still look like my brand color?

Yes — this is the core design of the fixer. It preserves the hue and saturation of your original color, and only adjusts lightness. A brand red at #E63946 will become a slightly darker red — still recognisable, still on-brand — instead of being flattened to black or grey.

What's the difference between AA and AAA?

AA requires 4.5:1 for normal text and 3:1 for large text — the minimum for most websites. AAA requires 7:1 for normal text and 4.5:1 for large text — a stricter level for medical, government, financial, and other high-stakes sites.

What is APCA and why does this tool show it?

APCA (Accessible Perceptual Contrast Algorithm) is the contrast model for WCAG 3.0. It accounts for human perception, font weight, and the asymmetry of dark-on-light vs. light-on-dark contrast. Your fixed colors are checked against APCA so they're future-proof.

What is "large text" in WCAG?

WCAG defines "large text" as 18pt (24px) or larger, OR 14pt (18.66px) bold or larger. Large text only needs 3:1 for AA (or 4.5:1 for AAA) because larger glyphs are easier to read at lower contrast.

Can I copy the fixed colors directly into my CSS?

Yes. The tool exposes the fixed foreground HEX, fixed background HEX, and a full CSS block with both colors ready to paste. Click any copy button to copy the value.

Does this tool work for dark mode?

Yes. The tool doesn't assume polarity — it just fixes contrast against whatever background you provide. For dark mode, paste your dark background and light foreground, and the fixer will lighten the foreground or darken the background as needed.

Why does the tool sometimes change my text color to a darker shade than expected?

Because the fixer prioritizes WCAG pass over visual fidelity. If your original color is very close to failing, the fixer will push it just past the target. Use the Manual Nudge slider if you want to fine-tune the exact ratio — for example, to 4.6:1 instead of 4.9:1.

What is the Color Blindness Simulation panel for?

It shows your current foreground/background pair simulated through protanopia, deuteranopia, and tritanopia — three common types of colour-blindness. Even if your colors pass WCAG, some color-blind users may still struggle if the two colors merge perceptually. The simulator helps you catch that.

Is this tool free?

Yes. Completely free, no signup, no email, no data collection. Everything runs locally in your browser.

Does the tool work on mobile?

Yes. The layout stacks vertically on small screens, the color pickers work with touch, and every button is thumb-friendly.

Can I fix contrast for multiple colors at once?

The current version fixes one pair at a time — the fastest workflow for designers adjusting a specific failing color. For bulk operations, use the Color Contrast Checker for diagnosis, then return here to fix each failing pair.

What is the Manual Nudge slider for?

The Manual Nudge slider lets you adjust the lightness of the foreground and background independently, seeing the resulting contrast ratio live. Use it when the auto-fix overshoots and you want a subtler change — for example, nudging from 4.9:1 down to a clean 4.55:1.

What is the difference between AA Large and AA Normal?

AA Large is 3:1 and applies to text 18pt+ or 14pt bold+. AA Normal is 4.5:1 and applies to everything smaller. Use AA Large for headlines and nav labels, AA Normal for body text.