A swatch filter shows each color as a small round swatch next to its name, instead of a plain checkbox. Shoppers can see "Olive" or "Navy stripe" at a glance and tick it to narrow the grid. Atelier shows swatch filters automatically: you set up the filter in Shopify's free **Search & Discovery** app, and the theme draws the swatches from the colors you've saved in Shopify admin. There's no theme setting to turn on.

The swatches come from Shopify's standard **Color** category metafield (its key is `shopify.color-pattern`). For a product to appear under a color, it needs a category and a color value.

## Before you start

- Install the **Search & Discovery** app from the Shopify App Store.
- Make sure each color you use has a swatch color (and an image, for patterns) in **Content** > **Metaobjects** > **Color**. See [Set up color swatches](/docs/atelier/color-swatches).

## Step 1: Give each product a category

1. In Shopify admin, go to **Products** and open a product.
2. In **Category**, choose the product's category, for example **Apparel & Accessories** > **Clothing** > **Shirts & Tops**.
3. Save. A **Category metafields** area appears with a **Color** field.

To set categories for many products at once, select them in the product list, click **Bulk edit**, and add the **Category** column.

## Step 2: Set the product's color

1. On the product, under **Category metafields**, click **Color**.
2. Choose one or more colors from the list, or create a new color entry.
3. Save.

If you've linked your product's **Color** option to the category metafield (see [Set up color swatches](/docs/atelier/color-swatches)), Shopify fills this field from the option values for you.

## Step 3: Add the Color filter

1. In Shopify admin, open the **Search & Discovery** app and go to **Filters**.
2. Click **Add filter** and choose **Color** (type **Category metafield**) as the source.
3. Save, and drag the filter into the order you want in your filter list.

Search & Discovery groups your colors into standard color families, shown under **Grouped values**: for example Oat, Sand and Stone all appear as **Beige**. Shoppers see one swatch per family. To change the groups, click **Manage values** on the filter.

Because this filter is based on Shopify's color entries, Shopify sends it to the theme as a swatch filter, and Atelier shows a swatch for each value. Filters based on entries with images (rather than colors) show the image instead.

## Step 4: Check filtering is on in the theme

1. Go to **Online Store** > **Themes** > **Customize** and open a collection template.
2. Click **Collection products** and make sure **Enable filtering** is on.
3. For search results, do the same in the **Search results** section of the search template.

![Collection page sidebar with the Color filter open: round swatches for Beige, Brown, Gray, Green, Pink and White, each with its product count, beside the product grid](../_images/swatch-filters-color-open.jpg)

## What shoppers see

- Each color shows its swatch, its name and the number of matching products, for example "Beige (3)".
- Colors with no matching products under the current filters are disabled.
- Ticked colors appear as chips above the grid, where shoppers can remove them.
- On phones, the filter is in the **Filter** drawer, with the same swatches.

## Tips

- Keep to one color entry per real color across all products ("Olive", not "Olive green" on some products), so the filter stays short and tidy.
- Use the filter's label in Search & Discovery to rename it, for example "Color" or "Colour".
- A product with several colors (for example a striped shirt) can have more than one color value, so it appears under each.
- If a color shows as a plain checkbox, open its entry in **Content** > **Metaobjects** > **Color** and check that it has a color or an image.

## Related

- [Collection filters and sorting](/docs/atelier/collection-filters)
- [Set up color swatches](/docs/atelier/color-swatches)
- [Collection page](/docs/atelier/collection-page)
- [Search page](/docs/atelier/search-page)