How to fix color contrast on Adobe Commerce (Magento)

Increase the contrast ratio between your text color and its background color to meet the WCAG 4.5:1 minimum, so all users — including those with low vision — can read your content clearly.

Steps for Adobe Commerce (Magento)

  1. Identify the failing CSS rule: use browser DevTools → Inspect the element → find the CSS file and rule responsible for the color.
  2. In your custom theme directory (app/design/frontend/<Vendor>/<theme>/), locate or create web/css/source/_overrides.less (or .css).
  3. Add a rule overriding the failing color to an accessible value (see snippet below).
  4. Run 'php bin/magento setup:static-content:deploy' and clear cache ('php bin/magento cache:clean').
  5. Verify the change in the browser and re-test contrast.
Official Adobe Commerce (Magento) documentation ↗

What is color contrast?

Color contrast is the difference in brightness between text and the background behind it. WCAG (Web Content Accessibility Guidelines) Success Criterion 1.4.3 requires that normal-sized text (below 18pt / 24px regular, or 14pt / ~18.5px bold) has a contrast ratio of at least 4.5:1 against its background. A ratio like 4.47:1 — for example, #777777 grey text on a white #ffffff background — falls just short of that threshold and is therefore a measurable accessibility failure. The ratio is a simple math score: higher numbers mean more contrast and easier reading.

Approximately 1 in 12 men and 1 in 200 women have some form of color vision deficiency, and many more users struggle with low contrast in bright sunlight or on older screens. Failing WCAG 1.4.3 exposes your store to legal risk in the US (ADA), UK (Equality Act), EU (EAA 2025), and other jurisdictions that reference WCAG as the accessibility standard for commercial websites. Beyond legal compliance, hard-to-read text directly hurts conversions: shoppers who can't comfortably read product descriptions, prices, or call-to-action buttons abandon faster. Google also uses accessibility signals as part of its Core Web Vitals and overall quality assessment, so fixing contrast issues can have a positive downstream effect on organic rankings.

See the complete Color contrast guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ scan — we’ll find color contrast and every other issue across your whole site.

Scan my site free

Fix color contrast on another platform