> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/volume-themes/products/color-swatches.md).

# Color Swatches

### **Native support**

The Volume theme natively supports Shopify color swatches configured using category metafields—no custom code required. When set up this way, color swatches will display consistently across product pages, product cards, and collection filters.

To configure color swatches using category metafields, follow the steps in [this Shopify Help Center guide](https://help.shopify.com/en/manual/custom-data/metafields/category-metafields/using-category-metafields#step-two).

You can also watch a short demo video to see the category metafields functionality in action:

{% embed url="<https://www.youtube.com/watch?v=scfMXijTUGM>" %}

{% hint style="success" icon="lightbulb" %}
Additionally, Volume allows you to [display a variant image](/docs/volume-themes/theme-settings/variant-picker.md#variant-image) as a swatch.
{% endhint %}

### **Legacy methods**

If you’re unable to upgrade to product categories, you can configure swatches using one of the legacy methods below.

**HEX colors**

To assign custom HEX colors to swatches:

1. Go to **Theme settings** → **Variant picker**.
2. Scroll down to **Custom colors for swatches**.
3. Add your color name and HEX code using the format `Name:#HEX`.

For example: `Wine:#722F37`

{% hint style="warning" icon="triangle-exclamation" %}
The name must exactly match the corresponding variant label.
{% endhint %}

**Image files**

To use images for color swatches:

1. Prepare square PNG images named after your product color options.
   * Example: `red.png` for “Red”, `ocean_blue.png` for “Ocean blue”.
   * Recommended size: **60x60px**
   * Max file size: **under 20KB**
2. In your Shopify admin, go to **Content** → **Files** and upload the images.
3. Once the **Color pills** feature is enabled, your uploaded swatches will be automatically assigned based on matching names.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://staylime.com/docs/volume-themes/products/color-swatches.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
