Products

Color swatches

Learn how to set up and display color swatches on product pages, product cards, and collection filters

Color swatches replace plain text option names with visual color indicators, making it easier for customers to browse and select product variants. They can appear in three places:

  • The collection page - as a color filter in the sidebar.
  • The product page - inside the variant picker.
  • The product card - as a color picker

Shopify has built-in support for color swatches. When you assign swatches directly to a product in the Shopify admin, the theme displays them automatically - no additional configuration is needed.

To learn how to assign color swatches in the Shopify admin, see Using category metafields.

Legacy configuration

You can also define color swatches using the legacy format in theme settings.

The legacy format is deprecated and will be removed in a future update. We recommend migrating to native Shopify swatches.

Adding swatches

Open the color swatch settings

  1. In your Shopify admin, go to Online Store > Themes and click Customize on the Atlas theme.
  2. Open Theme settings in the Theme Editor.
  3. Click Color swatches.

Enter your swatch definitions

In the Custom swatches field, add one swatch per line using the formats described below.

Configuration format

Each line in the configuration field defines a single swatch. The general syntax is:

Name:value

where Name is the color option value as it appears on your product and value is a HEX color code or an image filename.

Solid color

Red:#FF0000
Light blue:#00AAFF
Iris:#5D3FD3

Enter the color name, a colon, and the HEX value. Each color must be on its own line.

Use an online color picker to find the HEX value for any color.

Two-tone color

Purple / Light blue:#B055C4#84DAFF
Black and White:#000000#F4F4F4

To create a two-tone swatch, append a second HEX value directly after the first - no separator needed.

Image

Leather:leather.jpg

To use an image as a swatch, provide the filename of an image uploaded to your Shopify store.

Upload a swatch image

  1. In your Shopify admin, go to Content > Files.
  2. Click Upload files and upload your swatch image. For best results, use a 128 x 128 px .jpg image.

Reference the image in the configuration

Add a line to the Custom swatches field using the exact filename (including the extension) as it appears in your Shopify admin:

Leather:leather.jpg
Wood grain:wood-grain.png