# Swatches

The color swatches can be enabled and shown on all product cards and in the product page itself.

Examples:

<figure><img src="https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2F6bL1APo01cKDUY81ap85%2Fimage.png?alt=media&#x26;token=58ad309e-7868-46b9-9125-5b3e8beaa2f9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FIRDi2dN0hWNKi8e2bMxp%2Fimage.png?alt=media&#x26;token=ec65edf2-4141-4be1-b99f-e5ff1334389b" alt=""><figcaption></figcaption></figure>

The settings are as follows.

### **Swatches option name**

![](https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FAeqAIX8AkfDH9ieDgBj6%2Fimage.png?alt=media\&token=14fce574-c046-4f9e-be9a-9e98099059fa)

This should be the name of the option like `Color` , `Material`  etc. where you want to show swatches. The value in the field should match the option name taken from Shopify's admin page:

<figure><img src="https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FaP5GdWeUZhd75YYS3m1d%2Fimage.png?alt=media&#x26;token=1f971eb7-36db-4110-9579-87ac3a98316e" alt=""><figcaption></figcaption></figure>

If you want to show the swatches for your `Color` option - then in this field you should enter `Color`. If you want the swatches to be shown for `Material` then enter `Material` in this field.

**Updated:** you can now have swatches for more than one variant group. For example you can have swatches for both `Color` and `Material` by just listing them both in the field separated with comma `,` like this:\
![](https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2F8bc7N6TGnUXCFYv0FS78%2Fimage.png?alt=media\&token=78affa42-47d4-4f09-839f-4a607d4c1afd)

### Custom swatches

By default, the browser converts the color names to HTML hex codes. So if you add a color value like `Red` or `Blue` you'll automatically see the browser interpretation for these colors like pure red and pure blue colors.

However, If you want to use custom hex color codes OR images, and custom color names, you can add them by assigning them with pairs of color name and hex code or image name. Then, once these names are used in the products colors - you'll see them in the swatches.

To do so - list the pairs in the given textarea with the following format: `ColorName=#hexcode` or `ColorName=swatch.png`. Each entry should be on a new line. Example: `Dark red=#ff0000` .

Example with more entries:

![](https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FjDvRS2C9sL8ewIlbcHTm%2Fimage.png?alt=media\&token=ec3a55d9-740b-4cfc-962b-85369934b09b)

### Size option

This field is used to tell the theme which variant option is actually used for the sizes. Based on that field additional settings will be available like showing size chart and picking the variants style like buttons/dropdowns.

The value here should match the size option name from Shopify's admin page:

<figure><img src="https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FKhwulD0dYmR4sJrvaKse%2Fimage.png?alt=media&#x26;token=c6b97ea8-e777-4fbc-8e38-7ccb041715a7" alt=""><figcaption></figcaption></figure>

### Swatches definitions

There are additional options for choosing the type and styles of the swatches.

* Type: Swatches and Variant images
* Shape: Portrait, Square, Circle
* Size: picked in pixels for mobile and desktop

This settings above are available to be set separately for Product page, Product cards and Filters section.

**Example 1:**

<figure><img src="https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FEiFdYDjYFURLKNmSLULk%2Fimage.png?alt=media&#x26;token=d1164193-b533-4ffd-abaf-133a576247de" alt=""><figcaption></figcaption></figure>

**Example 2:**

<figure><img src="https://4207195275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp5czJlcYNU7vFLQkGMwL%2Fuploads%2FNpFf8U1QFGWZM1ybUJzq%2Fimage.png?alt=media&#x26;token=f1bf4d73-f9f0-4194-8455-920aa3ade5c2" alt=""><figcaption></figcaption></figure>
