Back to blog
AccessibilityMay 12, 20267 min read

How to Use a Contrast Checker (Step by Step)

M

Maya

Founder of ColorCraft

Dark screen with code

I once launched a client project where every design decision looked perfect on my calibrated monitor. Then the client opened it on a budget laptop in a sunny room and could not read half the text. The contrast ratios were technically passable on my screen but failed in real-world conditions. That project taught me that contrast checking is not optional — and doing it right requires more than just plugging two hex codes into a calculator.

Step 1: Identify What You Are Checking

Not all text is equal in the eyes of accessibility standards. Normal text — anything below 18px or 14px bold — needs a 4.5:1 contrast ratio to pass WCAG AA. Large text — 18px and above, or 14px bold and above — only needs 3:1. If you are aiming for WCAG AAA, those numbers jump to 7:1 and 4.5:1 respectively.

Before you start checking, know which category your text falls into. A heading at 24px has different requirements than body copy at 16px. I have seen designers fixate on perfecting body text contrast while ignoring that their small caption text at 12px is completely illegible.

Step 2: Test the Real Combination, Not the Swatch

A common mistake is checking a color against white in isolation, then placing that color on a gradient or image background in the final design. The swatch might pass, but the actual implementation fails because the background behind the text is not a flat color.

Always test the exact combination that will appear in the final design. If your text sits on a gradient, test it at the lightest point of that gradient. If it sits on an image, test it at the busiest part of the image. When in doubt, add a semi-transparent dark overlay behind the text and test against that overlay color instead of the image itself.

Step 3: Use the Right Tool Correctly

Open our contrast checker and enter your foreground and background colors. The tool will calculate the ratio instantly and tell you whether it passes AA, passes AAA, or fails.

If your combination fails, you have two options. You can darken the text, lighten the background, or do both. I usually start by adjusting the text color because background changes can cascade through the entire design system.

The tool also shows you a preview of how the combination looks, which is helpful because math and perception do not always align. A combination that mathematically passes might still feel too light for comfortable reading. Trust the preview as much as the number.

Step 4: Check Every State

Static text is only half the battle. Buttons have hover states, focus states, and disabled states. Links have visited and active states. Form fields have placeholder text, error text, and success text. Each of these states needs its own contrast check.

I keep a checklist for every project: default state, hover state, focus state, disabled state, error state, and placeholder state. If any of those combinations fail, the design is not ready for production. This sounds tedious, but it takes less than five minutes once you are in the habit.

Step 5: Test with Real Users or Simulators

Passing a contrast checker is necessary but not sufficient. Some people see colors differently. Someone with deuteranopia might struggle with a red-on-gray combination that passes every mathematical test. Someone with cataracts might need higher contrast than the standard requires.

After I run my combinations through the contrast checker, I put them through our color blindness simulator. It shows me how the design looks for people with protanopia, deuteranopia, and tritanopia. If important information becomes invisible in any of those modes, I know I need to add icons, labels, or patterns to supplement the color coding.

Common Mistakes to Avoid

  • Do not rely on thin fonts. A 2px font weight at the same color value will always feel less readable than a 700 weight. Check contrast at your actual font weight.
  • Do not forget about placeholder text. Light gray placeholders are the most common contrast failure I see in forms.
  • Do not test at 100% zoom on a 27-inch monitor. Shrink your browser to 320px wide and test again. Small screens amplify contrast problems.

Contrast checking is not a one-time task. It is a habit. Build it into your workflow and your designs will be better for everyone who sees them.

M

Maya — Founder of ColorCraft

I have been designing with color for over a decade, mostly by making every mistake possible first. ColorCraft is the toolset I wish I had when I started — no fluff, just practical tools that solve real problems. I write about what I have actually learned from real projects, not what sounds good in a textbook.