# Setting Up Color Swatches

**What You’ll Learn**

* How to assign a product category
* How to apply color swatches using Shopify's category metafields
* How to connect a color metafield to your theme’s product variants

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-d3bd3bb34e8c2a4b337c65d77552a91016c71a24%2FScreenshot%202025-04-10%20at%207.15.20%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### 1. Open the Product Page in the Theme Editor

* In the Shopify admin, go to **Online Store > Themes**, then click **Customize** on your live theme.
* Navigate to a product page.
* Click the **Product Variants** block inside the **Product Section**.
* Under **Variant Style**, select **Color Swatches**.

> 💡 Tip: Use the preview selector to load a product that has multiple color variants.

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-6c7ee6ccf627b0c12d4293ee7772a5bf1642505b%2FScreenshot%202025-04-10%20at%207.02.24%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Assign a Category in the Shopify Admin

* Go to **Products** in the Shopify Admin.
* Click on the product you want to edit.
* Scroll to the **Category** section and assign it to a relevant option (e.g. **Apparel & Accessories**).

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-3fac79715c64502b2d940bf19baa4d92129577db%2FScreenshot%202025-04-10%20at%207.07.21%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### 3. Add Color Values to the Category Metafields

* After assigning a category, scroll down to **Category Metafields**.
* You'll now see options specific to that category (like "Color").
* Click into the **Color** field and either select from the list or choose **Add new entry** to type in a custom color.

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-26577a4dc7b72bb89547ee824e6387f7cb7f860a%2FScreenshot%202025-04-10%20at%207.06.27%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-15d039c9df1a1f5d960e8649002236f06741c4fc%2FScreenshot%202025-04-10%20at%207.08.43%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-6aa967e8bf0a01ad8426b9a0e9646faea77d4fa2%2FScreenshot%202025-04-10%20at%207.09.37%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### 4. Link the Color Metafield to the Variant Block

* Return to the Theme Editor and click the **Product Variants** block again.
* Locate the **color variant** and click the **dynamic source icon** (stacked circle icon).
* Select the color metafield you added from the dropdown.

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-f27b79fd0ee7e9358ad08206d4d61ca07dcadd41%2FScreenshot%202025-04-10%20at%207.12.47%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-1213530727dacca79c58bf9bf93b27caec66c0ab%2FScreenshot%202025-04-10%20at%207.13.14%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-882e1c811adcf173d6013d5faa702af83b7d2fd8%2FScreenshot%202025-04-10%20at%207.13.38%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### 5. Save Your Changes

* Click **Done** and then **Save** at the top-right of the theme editor.

***

✅ Your product should now display clickable color swatches based on the metafield values you added.

> ⚠️ Warning: Color swatches only appear if your product has a **variant option named “Color”** and it’s matched with the corresponding metafield.

<figure><img src="https://3160093597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKGORQPMrQxrulX5pHNw%2Fuploads%2Fgit-blob-d3bd3bb34e8c2a4b337c65d77552a91016c71a24%2FScreenshot%202025-04-10%20at%207.15.20%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Need Help?**

* 💬 **Join our community on Discord:** <https://discord.gg/hcc2GvgZc6>
* 📧 **Email us at:** <support@openspaces.design>
* 💻 **Live chat with us:** Available Monday–Friday, 10AM–6PM EST, directly on our website
