Skip to main content

Shopify color swatches on product pages and filters

Show each colour as a swatch in the variant picker and in collection filters, using the swatches you set in Shopify.

Shopify product page with round color swatches above the size picker, a green T-shirt matching the selected swatch, and a Filter by color panel with swatch pills

The problem

A dropdown that lists “Sage”, “Moss” and “Olive” makes shoppers guess. Many stores install a swatch app, or hard-code colour names in the theme, and keep both in sync by hand.

The solution

Cama and Pops display Shopify’s own option swatches. The colour or image you set on each option value shows in the variant picker on the product page and in the collection filters. Swatches are on by default in the variant picker, and a theme setting controls how rounded their corners are.

How it works

  1. Set the colours in Shopify

    In Shopify admin, link the product’s Color option to the Color metafield and give each value a colour or an image.

  2. Keep swatches on

    In the theme editor, select the Variant picker block on the product template and check that Enable swatches is on.

  3. Add the filter

    In the Search & Discovery app, add a Color filter. Collection pages show it as swatches.

Questions merchants ask

  • Do I need a swatch app?

    No. The theme uses the swatches stored in Shopify, so you set each colour once.

  • Can a swatch show a pattern instead of a flat colour?

    Yes. Give the option value an image, such as a fabric close-up, instead of a colour.

  • Do swatches show on product cards?

    No. They show in the variant picker on the product page and in the collection filters.