# Color swatches ![A Hyper product page with color swatches for three lipstick shades, with Peach Pink selected](https://docs-assets.foxecom.app/hyper-theme/26085e3d-370a-4f13-93ef-4233d45ffe7b.png) Show your product colors as swatches, so customers see each color at a glance instead of reading color names. The **Color swatches** settings tell Hyper which product option holds your colors and which color each value shows. ## How to edit Color swatches 1. Go to **Online Store > Themes** in your Shopify admin. 2. Click **Edit theme** next to Hyper. 3. Click the **Theme settings** icon in the left sidebar. 4. Click **Color swatches**. 5. Adjust the settings described below. 6. Click **Save**. ## Settings | Setting | Description | Options | | ------------------------ | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- | | **Color swatch trigger** | The name of the product option that shows as swatches. | Enter the option name as it appears in your products. Separate names with a comma, for example `Color,Colour`. | | **Swatches list** | The color that each option value shows. | Enter each rule on its own line, as the value and a HEX code, for example `Red:#ff0000`. |
![Color swatch trigger set to Color, next to a product page where the Color option shows swatches](https://docs-assets.foxecom.app/hyper-theme/image_VXls6hIQ.png) ![The Swatches list with the rules Red:#ff0000, Green:#00ff00, and Blue:#0000ff](https://docs-assets.foxecom.app/hyper-theme/swatches-2_svBF9wUc.png) Swatches show only for a product option whose name is in **Color swatch trigger**. If your products use another name, such as **Colour**, add it to the trigger. ## Set swatch colors with Shopify category metafields You can also set swatch colors, patterns, and images in your Shopify admin, using the product's **Category metafields**. Make sure the variant option's name, such as **Color**, is in **Color swatch trigger**. When a color is set in both the category metafield and the **Swatches list**, Hyper uses the metafield color. 1. Go to **Products** in your Shopify admin. 2. Open the product you want to edit. 3. Select a category from Shopify's Standard Product Taxonomy in **Category**, such as *Apparel & Accessories > Clothing > Tops > Shirts*. 4. Click **Save**. Choose a category that supports the attribute you want to use for swatches, such as **Color**. The category makes its category metafields available for the product. ![The Category field of a product in the Shopify admin, set to School Backpacks in Backpacks](https://docs-assets.foxecom.app/pebble-theme/image_vWu9OqGT.png) Find the **Category metafields** section of the product, and open the metafield you want to use, such as **Color**. To edit an existing entry: 1. Open the category metafield. 2. Select the entry you want to edit. 3. Click **Edit**. 4. Make your changes. 5. Click **Save**. ![The Color category metafield with Pink, Orange, and Navy entries, and Edit highlighted in the menu of the Pink entry](https://docs-assets.foxecom.app/pebble-theme/image_59nXVCTN.png) To create a new entry: 1. Open the category metafield. 2. Click **Add new entry**. 3. Fill in the fields, such as the label, color value, or image. 4. Click **Save**. 5. Save the product again. ![The Color category metafield list with Pink, Orange, and Navy selected, and Add new entry highlighted](https://docs-assets.foxecom.app/pebble-theme/image_DPdFl7MN.png) A color entry can include: | Field | Description | | ---------------- | --------------------------------------------------------------------------- | | **Label** | The customer-friendly name of the swatch, such as Navy/Blue. | | **Color** | A HEX or RGB value used to show a solid-color swatch. | | **Image** | An optional image for patterns, textures, prints, or other visual swatches. | | **Base color** | The main color family of the swatch. | | **Base pattern** | The general pattern type, such as Solid or Striped. | | **References** | The products that use this entry. | | **Handle** | The internal reference that Shopify creates for the entry. |
![A Navy/Blue color entry with its Label, Color value #9EC5EC, Image, Base color, Base pattern, References, and Handle](https://docs-assets.foxecom.app/pebble-theme/image_djVUhMny.png) If an entry has both an **Image** and a **Color** value, the image shows as the swatch. The color value is used when there's no image.
1. Go back to the product in your Shopify admin. 2. Click **Add options like size or color** in the **Variants** section, or edit an existing option. 3. Select the category metafield, such as **Color**. Shopify fills in the option values with the metafield's entries. 4. Click **Save** on the product. ![Add options like size or color in the Variants section, with Color highlighted in the list](https://docs-assets.foxecom.app/pebble-theme/image_EufYhuNU.png) If you need a value that isn't in the list yet: 1. Select the custom option value. 2. Click **Add new entry**. 3. Fill in the entry. 4. Click **Save**. ![A Color option with Walnut, Tan, and a custom Navy/Blue value highlighted](https://docs-assets.foxecom.app/pebble-theme/image_cZIntjRG.png) ![The list of Color entries for a variant option, with Add new entry highlighted](https://docs-assets.foxecom.app/pebble-theme/image_G5ap1xBk.png) If the product already has a color option, connect it to the category metafield instead of creating it again. To connect an existing option, click the metafield icon next to **Option name**, then select **Color**. ![An existing Color option with Walnut, Tan, and Blue values, and Color selected from the metafield icon menu](https://docs-assets.foxecom.app/pebble-theme/image_AdHGUgEE.png) ![The Color option connected to the category metafield, with Walnut, Tan, and Blue shown as color swatches](https://docs-assets.foxecom.app/pebble-theme/image_jctwazdt.png)
Using category metafields gives you: * Swatch definitions you set up once and reuse across products. * The same labels and colors on every product. * Easier filtering and swatch display in your theme. Learn more in [Shopify Help: Using category metafields](https://help.shopify.com/en/manual/custom-data/metafields/category-metafields/using-category-metafields). ## Show swatches on your store 1. Open your product template in the theme editor. 2. Click the **Variant picker** block in the **Product information** section. 3. Select **Color swatches** in **Style**, under **Swatches**. 4. Click **Save**. ![The Variant picker block with Style set to Color swatches, next to a product page with red, beige, and dark gray swatches](https://docs-assets.foxecom.app/hyper-theme/image_yQBJHf52.png) 1. Go to **Theme settings > Product cards** in the theme editor. 2. Turn on **Enable color swatches**. 3. Click **Save**. ![Enable color swatches turned on in Product cards, next to product cards that show color swatches under the price](https://docs-assets.foxecom.app/hyper-theme/image_cTr3b3FY.png) To set how many swatches show (1–6) and the swatch type, see [Product cards](https://docs.foxecom.com/hyper-theme/theme-settings/product-cards). Your product pages and product cards show color swatches for the option you set in **Color swatch trigger**. ## Related articles Product cards Product information