Configuring Color Swatches Using Named Colors (OS 3.0 Themes)
Color swatches let customers pick a product's color variant from a visual palette instead of a text list. OS 3.0 themes generate these swatches using named colors — standardized CSS color keywords, such as red, navy, or coral, each mapped to a specific hexadecimal code — so a product's color variant values display as the correct swatch color automatically.
This guide explains how named colors work, how color swatches display on the Collections and Products pages, how to configure them using the Variants selector component, and provides a full reference chart of supported color names and their corresponding hex codes.
Storefront Effect of Color Swatches in OS 3.0 Themes
OS 3.0 themes use named colors to power the Variants selector component, which displays a product's color variants as a swatch palette. Customers see these swatches on both the Collections page and the Products page, and they can also be added to other product-related components (for example, Featured product).
This section focuses on the Collections page and the Products page, where customers most commonly encounter color swatches. The following sections describe the customer-facing effect on each.
On the Collections Page
- Hovering over a color swatch updates the product image to preview that color.
- Clicking a color swatch on a product card on the Collections page takes the customer to the Products page for that color variant.
On the Products Page
- When a customer arrives from the Collections page, the color they clicked is already selected.
- Clicking a different color swatch on the Products page updates the page the same way — the URL changes to reflect that color's SKU, and the swatch becomes selected.
- The customer selects a size, then clicks Add to cart to add the product to their cart — selecting a color and size alone does not add it automatically.
Configuring Color Swatches on the Collections Page
The Variants selector is a product card component that displays a product's color variants as a swatch palette and lets customers select a color and, if applicable, another variant attribute such as size, before adding the product to their cart. To add and configure the Variants selector on the Collections page:
- In the theme editor, select the Collections page from the page selector. In the left-hand layer menu, go to Product list > Product cards > Product info area, then add the Variants selector component.
- Once this component is added, color variants display as a swatch palette on product cards, and the other variant attribute (such as size) appears when a customer hovers over the product image.
- Configure the following settings for the Variants selector component:
- Palette style: Square, Round, or Rounded rectangle
- Swatch maximum display quantity: Drag the slider or enter a number directly to set how many color swatches display, from 1 to 6.
- Swatch display method: Display only 1 line, Scroll left and right, or Tiled display
- Swatch display size: Small, Medium, or Large
- Desktop display specifications / Mobile display specifications: Turn these on to show the other variant's attribute (such as size) as text next to the swatches. Each toggle applies independently to desktop and mobile.
- Specification dimensions: Small, Medium, or Large — sets the size of the specification text shown when display specifications are enabled.
- Click Save to apply your changes.
| Note: The Variants selector is an app block that can be added to, or come built into, any product-related component — it can be used anywhere in the theme editor where a product-related component (such as Featured product) can be placed. The steps above cover the Collections page specifically. |
Configuring Color Swatches on the Products Page
On the Products page, the Variants selector is a built-in component under Product information — unlike on the Collections page, it doesn't need to be added manually.
To configure it:
- In the theme editor, select the Products page from the page selector. In the left-hand layer menu, go to Product > Product section > Product information, then select Variants selector.
- Turn on Enable color palette. Once enabled, the color palette displays as a tile view by default. Configure the following settings for the Variants selector component:
- Palette style: Sets the shape of the color swatches (for example, Square).
- Title typography: Sets the font style used for the variant option title (for example, Body 3).
- Variant out-of-stock style: Sets how out-of-stock variants are indicated (for example, Half-width slash (grayed out)). This setting applies to text and image buttons only — color swatch buttons don't support it.
- Variant selected style: Sets how the selected variant is highlighted (for example, Border highlight).
- Display size: Sets the size of the color swatches (for example, Medium).
- Desktop layout: Sets the layout direction on desktop (for example, Horizontal layout).
- Mobile layouts: Sets the layout direction on mobile (for example, Vertical layout).
- Click Save to apply your changes.
|
Notes:
|
Named Color Reference Chart for OS 3.0 Themes
The tables below list every named color supported by OS 3.0 themes, along with its corresponding hex color code. These names follow the standard CSS Color Module keyword list, so the same names and values apply consistently across your storefront.
Standard Named Colors
| Color Keyword | HEX Color Codes |
| black | #000000 |
| silver | #c0c0c0 |
| gray | #808080 |
| white | #ffffff |
| maroon | #800000 |
| red | #ff0000 |
| purple | #800080 |
| fuchsia | #ff00ff |
| green | #008000 |
| lime | #00ff00 |
| olive | #808000 |
| yellow | #ffff00 |
| navy | #000080 |
| blue | #0000ff |
| teal | #008080 |
| aqua | #00ffff |
Extended Named Colors
| Color Keyword | HEX Color Codes |
| aliceblue | #f0f8ff |
| antiquewhite | #faebd7 |
| aquamarine | #7fffd4 |
| azure | #f0ffff |
| beige | #f5f5dc |
| bisque | #ffe4c4 |
| blanchedalmond | #ffebcd |
| blueviolet | #8a2be2 |
| brown | #a52a2a |
| burlywood | #deb887 |
| cadetblue | #5f9ea0 |
| chartreuse | #7fff00 |
| chocolate | #d2691e |
| coral | #ff7f50 |
| cornflowerblue | #6495ed |
| cornsilk | #fff8dc |
| crimson | #dc143c |
| cyan (same as "aqua") |
#00ffff |
| darkblue | #00008b |
| darkcyan | #008b8b |
| darkgoldenrod | #b8860b |
| darkgray | #a9a9a9 |
| darkgreen | #006400 |
| darkgrey | #a9a9a9 |
| darkkhaki | #bdb76b |
| darkmagenta | #8b008b |
| darkolivegreen | #556b2f |
| darkorange | #ff8c00 |
| darkorchid | #9932cc |
| darkred | #8b0000 |
| darksalmon | #e9967a |
| darkseagreen | #8fbc8f |
| darkslateblue | #483d8b |
| darkslategray | #2f4f4f |
| darkslategrey | #2f4f4f |
| darkturquoise | #00ced1 |
| darkviolet | #9400d3 |
| deeppink | #ff1493 |
| deepskyblue | #00bfff |
| dimgray | #696969 |
| dimgrey | #696969 |
| dodgerblue | #1e90ff |
| firebrick | #b22222 |
| floralwhite | #fffaf0 |
| forestgreen | #228b22 |
| gainsboro | #dcdcdc |
| ghostwhite | #f8f8ff |
| gold | #ffd700 |
| goldenrod | #daa520 |
| greenyellow | #adff2f |
| grey (same as "gray") |
#808080 |
| honeydew | #f0fff0 |
| hotpink | #ff69b4 |
| indianred | #cd5c5c |
| indigo | #4b0082 |
| ivory | #fffff0 |
| khaki | #f0e68c |
| lavender | #e6e6fa |
| lavenderblush | #fff0f5 |
| lawngreen | #7cfc00 |
| lemonchiffon | #fffacd |
| lightblue | #add8e6 |
| lightcoral | #f08080 |
| lightcyan | #e0ffff |
| lightgoldenrodyellow | #fafad2 |
| lightgray | #d3d3d3 |
| lightgreen | #90ee90 |
| lightgrey | #d3d3d3 |
| lightpink | #ffb6c1 |
| lightsalmon | #ffa07a |
| lightseagreen | #20b2aa |
| lightskyblue | #87cefa |
| lightslategray | #778899 |
| lightslategrey | #778899 |
| lightsteelblue | #b0c4de |
| lightyellow | #ffffe0 |
| limegreen | #32cd32 |
| linen | #faf0e6 |
| magenta (same as "fuchsia") |
#ff00ff |
| mediumaquamarine | #66cdaa |
| mediumblue | #0000cd |
| mediumorchid | #ba55d3 |
| mediumpurple | #9370db |
| mediumseagreen | #3cb371 |
| mediumslateblue | #7b68ee |
| mediumspringgreen | #00fa9a |
| mediumturquoise | #48d1cc |
| mediumvioletred | #c71585 |
| midnightblue | #191970 |
| mintcream | #f5fffa |
| mistyrose | #ffe4e1 |
| moccasin | #ffe4b5 |
| navajowhite | #ffdead |
| oldlace | #fdf5e6 |
| olivedrab | #6b8e23 |
| orange | #ffa500 |
| orangered | #ff4500 |
| orchid | #da70d6 |
| palegoldenrod | #eee8aa |
| palegreen | #98fb98 |
| paleturquoise | #afeeee |
| palevioletred | #db7093 |
| papayawhip | #ffefd5 |
| peachpuff | #ffdab9 |
| peru | #cd853f |
| pink | #ffc0cb |
| plum | #dda0dd |
| powderblue | #b0e0e6 |
| rebeccapurple | #663399 |
| rosybrown | #bc8f8f |
| royalblue | #4169e1 |
| saddlebrown | #8b4513 |
| salmon | #fa8072 |
| sandybrown | #f4a460 |
| seagreen | #2e8b57 |
| seashell | #fff5ee |
| sienna | #a0522d |
| skyblue | #87ceeb |
| slateblue | #6a5acd |
| slategray | #708090 |
| slategrey | #708090 |
| snow | #fffafa |
| springgreen | #00ff7f |
| steelblue | #4682b4 |
| tan | #d2b48c |
| thistle | #d8bfd8 |
| tomato | #ff6347 |
| turquoise | #40e0d0 |
| violet | #ee82ee |
| wheat | #f5deb3 |
| whitesmoke | #f5f5f5 |
| yellowgreen | #9acd32 |