Skip to content

Colour swatches

Colour options render as chips rather than text pills — on product cards, in the variant picker, and in quick view. You don’t upload a swatch image for every colourway unless you want to.

Theme settings → Swatches

SettingTypeDefaultWhat it does
Swatch option namesTextcolor, colour, shade, tintComma-separated product option names that render as swatches
Custom swatch colorsTextarea(empty)Your own colours, one per line, as Name:#hex or Name:image URL

An option whose name matches swatch_options (case-insensitive, whitespace trimmed) becomes a chip row. Everything else stays a labelled pill. Add your own names if your catalogue uses something else — Finish, Colourway, Dye.

Three stages, in order. The first hit wins.

  1. Your swatch map. An exact, case-insensitive match on the option value in swatch_map.

  2. The built-in dictionary. Around 130 curated names, covering the whole value exactly — Black, Off White, Rose Gold, Sage Green, Slate Grey, Hunter Green, Espresso, Champagne, Titanium, and so on. Common spelling variants are handled: grey/gray, off-white/offwhite, rose-gold/rosegold.

  3. Word fallback. The value is split on spaces and each word checked against a shorter list of base colours, so Faded Olive finds olive and Washed Navy Blue finds navy. Nothing found ends at a neutral #ccc.

That last stage is what keeps a catalogue of poetic colour names from turning into a row of grey squares. It’s a fallback, though — not a substitute for naming the colour properly.

One line each in swatch_map:

Clay:#b0653a
Deadstock Olive:#4a5338
Signal Orange:#d56a40

The name is matched against the option value exactly as a shopper sees it, so it must be the same string as the one in the product’s option — Clay, not clay dyed. Case and surrounding whitespace don’t matter.

A line whose value contains // is treated as an image URL rather than a colour:

Camo Print:https://cdn.shopify.com/s/files/1/…/camo-swatch.jpg
Tie Dye Rust:https://cdn.shopify.com/s/files/1/…/tiedye.png

The image is painted as a cover-fitted, centred background on the chip, with a neutral grey behind it while it loads. This is the answer for prints, heathers, marls and anything else a single hex can’t honestly represent.

Upload the file under Content → Files in admin and copy its URL.

PlaceBehaviour
Product cardA row of chips under the card, when Theme settings → Product cards → Show color swatches is on
Variant picker34 px chips, with an accent outline on the selected one
Quick viewChips read back from the card, so they match exactly

In the variant picker, a chip carries a title attribute with the colour name and a visually hidden label, so the name is available to a screen reader and on hover even though the chip itself is wordless. The selected chip is marked with an outline and an outline offset rather than colour alone, which matters when the colour being selected is itself a shade of the accent.

Non-swatch option pills — sizes — show unavailability as a diagonal hatch with dimmed text, and stay clickable so a shopper can select a sold-out size and reach the back-in-stock form. Values that resolve to no variant at all are disabled outright.