VibeFix

Guide · Shopify

Shopify color contrast: how to check and fix it

Published by Yosef Dabian, founder of VibeFix

Updated

Short answer: WCAG success criterion 1.4.3 asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large-scale text, and 1.4.11 asks for at least 3:1 for user interface components and graphics. In Shopify you set colors in the theme editor, in color schemes under Theme settings. You can measure a pair of colors with the WebAIM contrast checker or with Chrome DevTools, change the color value in your theme on a duplicate copy, and measure again.

Check your store's homepage for accessibility issues, free. We open it like any visitor and only read the page.

Add your email only if you want the report link sent to you too. Privacy

Want it fixed? Our AI agent fixes accessibility issues in your Shopify theme's code within 48 hours of you giving us access to your theme, on an unpublished copy you preview and publish yourself. $490 one time. See the store service.

Verdict

QuestionAnswer
Can I fix it myself?Yes, if you can open the theme editor. Read the two colors with Chrome DevTools, measure them in the WebAIM checker, change the color in its color scheme under Theme settings on a duplicate of your theme, and measure again. A color that is written in the theme's code needs a code change on the copy.
How serious is it?Text, buttons, borders and icons that fall below the ratios are hard to read for some visitors, and an automated check flags them. In an automated check of the homepages of 500 US Shopify stores drawn from the 3,388 that ran an accessibility widget in HTTP Archive's 1 Nov 2026 crawl, the WCAG-tagged color-contrast rule failed on 306 (61.2%).
What does a fix cost?Free if you follow the steps below. If you want it fixed for you, our AI agent fixes it in your code (see pricing) and re-checks your live app.

Key takeaways

What do WCAG 1.4.3 and 1.4.11 require?

1.4.3 Contrast (Minimum). The W3C's text of the criterion says: "The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for the following:" One of the exceptions is: "Large-scale text and images of large-scale text have a contrast ratio of at least 3:1;". The W3C says that "18 point text or 14 point bold text is judged to be large enough to require a lower contrast ratio." Text in an inactive user interface component is excepted, and "Text that is part of a logo or brand name has no contrast requirement." (W3C, Understanding 1.4.3).

Two details matter in practice. First, the W3C says the criterion applies to "text in the page, including placeholder text", so the gray hint text in a form field counts. Second, the page says "the computed values should not be rounded (e.g., 4.499:1 would not meet the 4.5:1 threshold)". A tool that shows 4.5 after rounding can still be a fail, so compare the unrounded number.

1.4.11 Non-text Contrast. The W3C's text says: "The visual presentation of the following have a contrast ratio of at least 3:1 against adjacent color(s):". The list covers "Visual information required to identify user interface components and states, except for inactive components" and "Parts of graphics required to understand the content, except when a particular presentation of graphics is essential". The page adds that "any visual information necessary to indicate state, such as whether a component is selected or focused" counts, and that "the visual focus indicator for a component must have sufficient contrast against the adjacent background". "User Interface Components that are not available for user interaction (e.g., a disabled control in HTML) are not required to meet contrast requirements." (W3C, Understanding 1.4.11).

1.4.1 Use of Color is the third rule that touches color. It says color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element (W3C, Understanding 1.4.1). For links inside a paragraph, the W3C lists "Using a contrast ratio of at least 3:1 to distinguish inline text links from surrounding text" as one sufficient technique.

Shopify's own theme accessibility page lists the same checks for a store: "The color of body text and button text has a contrast ratio of at least 4.5:1 against its background.", "The color of headings and other large text (font size 24 px and up) has a contrast ratio of at least 3:1 against its background.", and "The color of non-text elements, including input borders and icons, has a contrast ratio of at least 3:1 against its background." (Shopify Help Center, Accessibility for themes).

How is the ratio calculated?

The W3C defines it as "(L1 + 0.05) / (L2 + 0.05)", where L1 is the relative luminance of the lighter color and L2 that of the darker one. For the sRGB colorspace, relative luminance is "L = 0.2126 * R + 0.7152 * G + 0.0722 * B", with each channel converted by "if RsRGB <= 0.04045 then R = RsRGB/12.92 else R = ((RsRGB+0.055)/1.055) ^ 2.4" (W3C, WCAG 2.2). The result runs from 1:1 (same color) to 21:1 (black on white).

You do not need to do this by hand. If you want to check a pair in the browser console, paste this. It takes six-digit hex colors, such as #767676:

// Contrast ratio of two six-digit hex colors, from the WCAG formula
function luminance(hex) {
  const [r, g, b] = hex.replace('#', '').match(/.{2}/g).map((h) => {
    const s = parseInt(h, 16) / 255;
    return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
  });
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}

function contrast(a, b) {
  const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x);
  return (hi + 0.05) / (lo + 0.05);
}

// Compare the unrounded number to the threshold
const ratio = contrast('#767676', '#ffffff');
console.log(ratio.toFixed(2), ratio >= 4.5 ? 'passes 4.5:1' : 'fails 4.5:1');

The code is read-only: it changes nothing on your store. These worked examples come from running the formula (our arithmetic, not a W3C table):

Text colorBackgroundRatioNormal text (4.5:1)Large text or UI part (3:1)
#121212#ffffff18.73:1passespasses
#b3261e#ffffff6.54:1passespasses
#767676#ffffff4.54:1passes, with little roompasses
#999999#ffffff2.85:1failsfails

The #999999 row is a light gray that can suit hint text and disabled-looking labels. It can look fine on a good screen and still fails both thresholds.

Where are colors set in a Shopify theme?

Some themes group colors into color schemes. Shopify's page on color settings says: "A color scheme is a group of color input fields for different elements, such as backgrounds, text, and borders," and "Create and manage your color schemes in the Theme settings section of the theme editor". Sections then use the Color scheme input field to assign a color scheme to that element (Shopify Help Center, Color settings).

In Dawn, Shopify's open-source theme, the settings file defines a color scheme group with these fields: background, text, button, button_label, secondary_button_label and shadow (plus a background_gradient field). The defaults for the first four are #FFFFFF for the background, #121212 for the text and button, and #FFFFFF for the button label (Shopify Dawn, settings_schema.json). That is 18.73:1 for text on the background in the table above, and the same for the button label on the button. A store passes or fails based on the colors someone picks, not on the theme's defaults.

So a failing pair can sit in two places: in a color scheme that several sections share, or in the section's own settings. Changing one scheme color can fix every section that uses that scheme. If a color is not offered as a setting in your theme, it is written in the theme's code, which the theme code page describes.

How do you check color contrast on your store?

WebAIM contrast checker. The page asks you to enter a valid hex value (alpha value optional) or use the color picker, once for the foreground and once for the background. WebAIM states: "Large text is defined as 14 point (typically 18.66px) and bold or larger, or 18 point (typically 24px) or larger." It also says: "WCAG 2.1 requires a contrast ratio of at least 3:1 for graphics and user interface components (such as form input borders)." (WebAIM, Contrast Checker).

Chrome DevTools. Chrome's documentation says to "Open the Color Picker next to the color declaration of the element's text" and then "expand the Contrast ratio section." It says: "To stay within the AA or AAA level, pick a color below the top or bottom line respectively." The CSS Overview panel can list contrast issues: "Open the Colors section, go to Contrast issues, and click an issue, if any." (Chrome DevTools documentation, Contrast).

Shopify's suggestion. Shopify's page recommends an online contrast ratio tool for checking the different parts of your store (Shopify Help Center, Accessibility for themes).

To get the two colors, open your store in your browser, pick the text with the DevTools Inspect button, and read the text color and the background color from the Styles panel. Then type the two values into the WebAIM checker. When the text sits on a photo or a gradient, there is no single background color to read. Measure the text against the lightest and the darkest part of the image behind it (our method), and we suggest treating the worst pair as the result.

Which spots on a Shopify store should you check?

This is our checklist of places where one color sits on another. It is not a ranking of what fails most.

How do you fix a failing color?

  1. Duplicate your theme first. Shopify's page on theme code advises: "Duplicate your theme". It makes it easy to discard your changes and start again.
  2. In the theme editor on the copy, open Theme settings and Colors, and change the failing color in its color scheme. Keep the brand color for large areas and adjust the text or button color until the pair passes. Measure the new pair before you save, so you do not trade one failing pair for another.
  3. For text over an image, add a darker semi-transparent layer between the text and the image if your theme offers an overlay setting, or move the text onto a solid area (our suggestion). Then measure against the worst part of the image.
  4. Measure the pair again with the WebAIM checker, then look at the page on a phone and a desktop.
  5. If a color is set in the theme's code and not in a setting, change it there on the copy. This is an example of a code-level change for a badge; replace the selector and the values with the pair you measured. If your theme drives this color from a setting, change the setting instead:

Check your store's homepage for accessibility issues, free. We open it like any visitor and only read the page.

Check my store free

Free. No email needed. It usually takes about a minute.

Want it fixed? Our AI agent fixes accessibility issues in your Shopify theme's code within 48 hours of you giving us access to your theme, on an unpublished copy you preview and publish yourself. $490 one time. See the store service.

/* Example only: append to the stylesheet in your theme copy */
.badge {
  color: #ffffff;
  background-color: #b3261e; /* 6.54:1 against white by our calculation */
}
  1. Preview the copy on a phone and a desktop. Publish when the check passes. The original theme stays as it was, so you can switch back.

What did our 500-store check find?

We ran an automated check of the homepages of 500 US Shopify stores, drawn from the 3,388 that ran an accessibility widget in HTTP Archive's 1 Nov 2026 crawl. The WCAG-tagged color-contrast rule (axe-core 4.14.0) failed on 306 of 500 (61.2%). This describes those stores' homepages only. It is not a statement about all Shopify stores. The full figures are in our 500-store study.

Every Shopify accessibility guide we publish, and the outside sources we rely on, are listed in the Shopify accessibility and ADA resource hub.

By theme, text too faint to read showed up on 42% to 81% of the stores on each of the 10 most common themes in our sample. See which Shopify theme had the fewest accessibility failures.

FAQ

What contrast ratio does large text need?

3:1 under WCAG 1.4.3. The W3C defines large-scale text as at least 18 point, or 14 point bold. WebAIM gives the typical pixel sizes: "14 point (typically 18.66px) and bold or larger, or 18 point (typically 24px) or larger." Shopify's own page uses "font size 24 px and up".

Does a disabled button need to pass?

The W3C says: "User Interface Components that are not available for user interaction (e.g., a disabled control in HTML) are not required to meet contrast requirements." Text in an inactive component is covered by the same kind of exception under 1.4.3.

Does my logo need to pass?

The W3C's page for 1.4.3 says: "Text that is part of a logo or brand name has no contrast requirement."

Does placeholder text count?

Yes. The W3C says the criterion applies to text in the page, "including placeholder text". Check the hint text in your search box, email field and discount code field.

My tool says 4.5, so is that a pass?

Not necessarily. The W3C says the values are thresholds that "should not be rounded", and gives 4.499:1 as an example that would not meet 4.5:1. Compare the unrounded ratio, as in the code above.

Can I fix contrast without editing code?

Where your theme offers the color as a setting, yes: Shopify says you create and manage color schemes in the Theme settings section of the theme editor. Colors that are written in the theme's code need a code change. Shopify says: "You can use the theme editor to customize your online store's content, layout, typography, and colors." (Shopify Help Center, The theme editor)

How do I check text over a photo?

Look at it on a phone and on a desktop: the text should stand out clearly from the photo behind it. Our free check lists each text and background color pair on your homepage that fails the contrast rule.

How does VibeFix fix it?

Our AI agent fixes the accessibility issues in your Shopify theme's code, after you accept our access request or send us your theme as a .zip. It works on an unpublished copy of your theme, we review each change, and you preview it and publish it yourself. You get a dated before-and-after report.

The free store check needs no card and no payment. Start with the free homepage check: no email needed, and your report appeared on the page in under a minute in each of our 24 test runs. How it works for Shopify stores

If you received an ADA demand letter, see what we do for demand letters.

Related: WCAG 2.2 checklist for a Shopify theme and what a Shopify accessibility audit checks.

This page is general information, not legal advice. VibeFix is independent and is not affiliated with any company named here. Shopify is a trademark of Shopify Inc. Other names are trademarks of their owners.

Last checked: 26 November 2026, against the sources listed in the claims below.

Related guides

VibeFix's AI agent fixes these issues in your theme's code on an unpublished copy. You preview the copy and publish it yourself, and the AI agent re-checks your live store and gives you a dated before-and-after report.

How this guide was made: Written with AI assistance and checked against the sources linked on this page.

Want it fixed?

Our AI agent fixes accessibility issues in your Shopify theme's code within 48 hours of you giving us access to your theme, on an unpublished copy you preview and publish yourself. $490 one time. See the store service.

It starts with a free check of your public homepage. No email needed.

Check my store free

Shopify Accessibility Watch

Our monthly store-check numbers, one email a month.

We send a confirmation email first. One email a month, unsubscribe in one click. See our privacy notice.

More guides · Videos · Use VibeFix in Claude Code · Shopify store accessibility · About · Your privacy choices