Skip to content

Color Swatch Field

The Color Swatch field displays options as solid colored blocks that customers can click to select. This provides a visually intuitive way to choose colors without relying on text labels.

Common Use Cases

  • Selecting the primary color of a garment (Red, Blue, Green)
  • Choosing a paint color for a custom product
  • Picking a hardware finish (Gold, Silver, Matte Black, Rose Gold)
  • Selecting a thread or ink color for embroidery or printing

Field Settings

When you add a Color Swatch field and expand it in the builder, the following settings are available:

General

SettingDescription
LabelThe title displayed above the swatch grid (e.g., "Select Your Color").
DescriptionOptional help text shown below the swatches.
RequiredWhen checked, the customer must select a color before adding the product to the cart.

Display Style

You can choose how the swatch options are rendered on the frontend:

StyleDescription
Swatch OnlyShows just the colored block. Clean and minimal.
Swatch + LabelShows the colored block with the choice label text below it (e.g., "Ocean Blue"). Useful when exact color names matter.

Choices (Options)

You must define at least one choice. Each choice has the following columns:

ColumnDescription
ColorClick the color preview block to open a native color picker. Select the exact hex color (e.g., #FF5733 for a warm red-orange).
LabelThe text identifying this choice (e.g., "Midnight Blue"). The Value is automatically generated from the label.
PriceThe numeric amount to add to the product price when this color is selected. Only visible when Price Type is not "No Price".
Price TypeHow this choice affects pricing. Options: No Price, Flat Fee, Percentage of Base, or Formula. Each choice can have its own independent price type.
WeightAdditional shipping weight to add when this choice is selected.

TIP

The size and shape of color swatches are configured globally in WooCommerce > Settings > OptionBay. Use the "Swatch Size" setting to control dimensions and "Swatch Radius" to switch between square (4px) and circular (50%) shapes.

You can add new choices using the + Add Choice button and remove them using the trash icon.

Conditional Logic

You can show or hide this field based on the value of another field in the same group. For example, show a "Thread Color" swatch only when the customer checks an "Add Custom Embroidery?" checkbox.

For full details on setting up rules, see the Conditional Logic page.

Released under the GPL-2.0 License.