← All postsPerson using Contrast Checker on a laptop for a real accessibility QA task

Fix an Orange Button and Gray Caption That Fail WCAG Contrast

Test text and button colours against WCAG AA and AAA, read the ratio, and find a darker shade that passes without a redesign.

contrast checkerWCAGaccessibilitycolour contrastbutton designweb designdesign toolsbrowser tools
4 min readDesign & Marketing

An accessibility audit comes back with two lines you did not expect: the white label on your orange call-to-action button is hard to read, and the gray caption under every product card is too faint. Both looked fine on your monitor. Contrast Checker turns "looks fine" into a ratio you can compare with the WCAG thresholds.

Type or pick a text colour and a background colour, and the tool shows the contrast ratio, pass or fail marks for AA and AAA, and a live preview line in those colours.

Check colour contrast for WCAG

Check colour contrast for WCAG

The audit findings, one by one

Take a brand orange of #F26B3A with white text on a button. Enter #FFFFFF as the Text Color and #F26B3A as the Background Color. The tool shows a ratio of 3.02:1. For normal text, AA needs 4.5:1, so it fails. For large text, AA needs 3:1, so it squeaks by. A 16-pixel label on a button is not large text, so this is a fail in practice.

Now the caption: #6B7280 text on a #F3F4F6 card. The ratio is 4.39:1, just under 4.5:1. On a pure white background the same gray scores 4.83:1 and would pass, which shows how a slightly tinted card can flip the result. The tool floors the figure rather than rounding it, so a 4.499 never appears as 4.50 beside a fail mark.

A third check is placeholder text. #999999 on white gives 2.84:1, which fails both normal and large text. If your form placeholder is that gray, it is the kind of thing audits catch.

Finding a shade that passes

When a pair falls short of 4.5:1, the tool offers a button reading "Use #xxxxxx (passes AA)". It darkens the text colour on a light background, or lightens it on a dark one, until the ratio reaches 4.5:1. That is useful for text on a fixed background.

For the orange button you would rather keep the white label and darken the background. Try #C2410C: white on it scores 5.17:1 and passes AA for normal text. It is a deeper burnt orange, still clearly on-brand, and no longer relies on large text rules. A shade in between, #D9531E, scores only 4.03:1 and still fails, which is a useful reminder that a small step toward the original colour is often not enough. Keep darkening until the AA badge turns green, then record the hex value in your design tokens.

Gray captions are easier. #6B7280 on white is 4.83:1, so either move the caption off the tinted card or darken it to #4B5563, which scores 7.55:1 on white and 6.86:1 on the tinted card, enough for AAA on normal text in both places. Check each combination you plan to ship, not just the first.

Steps in the tool

  1. Enter the Text Color, either with the colour picker or by typing HEX, rgb(), hsl() or a CSS colour name.
  2. Enter the Background Color the same way.
  3. Read the large ratio at the top, for example 4.39:1.
  4. Check the Normal Text column: AA needs 4.5:1, AAA needs 7:1.
  5. Check the Large Text column: AA needs 3:1, AAA needs 4.5:1.
  6. For icons, input borders and focus rings, read the separate WCAG 1.4.11 line, which needs 3:1.
  7. Use Swap colors to test the reverse pairing, such as a light label on a dark footer, or the suggestion button to jump to a passing text colour.

What counts as large text

WCAG treats text as large when it is at least 18 point regular or 14 point bold. On screen that is roughly 24 pixels, or about 18.66 pixels in bold. The tool does not measure your text, so you decide which column applies. When in doubt, use the normal text column. A button label at 16 pixels, bold or not, belongs in the stricter column.

Mistakes that slip through

  • Testing only the default state. Hover, focus and disabled colours need their own check, and so does the text over a hero photo. Pick the lightest part of the image behind the words.
  • Using a brand colour for text because it is the brand colour. A bright teal such as #4FD8C4 on white scores only 1.76:1, but the same teal on a dark navy such as #0B1F2A scores 9.61:1. Choose the direction that works.
  • Testing semi-transparent colours. The tool compares the two values as given and does not blend an alpha channel. Convert to the solid blended colour with Color Converter first, then test that.
  • Treating a pass as a full accessibility review. Contrast is one criterion. Font size, focus order and labels also matter.
  • Assuming AAA is mandatory. Many organisations target AA and use AAA for long-form reading text.

Recording the result

Write down both colours and the ratio next to each component in your style guide, for example "Button label, white on #C2410C, 5.17:1, AA pass". A reviewer can then repeat the check in seconds. If you are still choosing colours, Color Palette helps you generate a set to test, and the design tools category has gradient and shadow helpers for the next step. Contrast Checker runs in your browser, and each check counts toward your 10 trial usages a day, so test the pairs that matter most first.

This tool reports mathematical contrast ratios against published WCAG thresholds. It is not a certification and does not replace testing with real users.

Which pair is hardest to fix on your site, body text on tinted cards or labels on brand-coloured buttons? Tell us on the contact page.

Open Color Contrast CheckerOpen HEX / RGB / HSL ConverterOpen Color Palette Generator