> 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

Set up color swatches in Volume using native Shopify category metafields, custom HEX values in Theme settings, or uploaded PNG swatch images.

### **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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
