New Shopify Schema: color_palette in Liquid Themes

A setting of type color_palette defines a set of named colors available across your theme's color and color_background settings. Merchants see these colors in a grid in the theme editor and can pick from them when adjusting any color setting

New Shopify Schema: color_palette in Liquid Themes
0 sections

A setting of type color_palette defines a set of named colors available across your theme's color and color_background settings. Merchants see these colors in a grid in the theme editor and can pick from them when adjusting any color setting.

You can add only one color_palette per theme, and it must be in settings_schema.json. The default object defines the theme's starting palette. Any changes a merchant makes in the theme editor are stored in settings_data.json and take precedence over the defaults.

Unlike most input settings, color_palette supports only the id standard attribute, which is required. The label, info, and visible_if attributes aren't supported. It has the following additional attribute:

AttributeDescriptionRequired
defaultAn object of key-value pairs defining the palette colors. Keys must start with a letter and can contain letters, digits, and underscores. Values must be valid hex colors without an alpha channel (for example, #FFF or #FF4416). Eight-digit hex values with alpha aren't supported. At least two entries are required.Yes

A palette supports between 2 and 20 colors. Colors are returned in the order they appear in the JSON.

For example, the following setting generates the following output:

  • Settings:
  • json
    {
      "type": "color_palette",
      "id": "colors",
      "default": {
        "primary": "#121212",
        "secondary": "#FFFFFF",
        "accent": "#FF4416"
      }
    }
  • Output:
  • When accessing the value of a color_palette type setting, you access individual palette colors through settings.<id>, where <id> matches the id you defined in the schema. Each color is returned as a color object with full access to color properties and filters.

    liquid
    {{ settings.colors.primary }}

    Iterating over the palette yields each color as a color object in JSON key order. Keys aren't available during iteration, only the color values:

    liquid
    {% for color in settings.colors %}
      {{ color }}
    {% endfor %}

    Cross-setting references

    You can use a palette color as the default value of a color or color_background setting. The value must be a Liquid output tag that references a palette key, for example {{ settings.colors.primary }}. Only color_palette access paths are supported as dynamic defaults. See the color and color_background sections for examples.

    Theme updates

    When a theme update adds new keys to the palette default, those keys appear automatically in the merchant's palette. Merchant-customized values are preserved and take precedence over new defaults.

    Deleting palette colors

    When a merchant deletes a palette color in the theme editor, Shopify asks them to choose a replacement. The deleted color's value is stored as a reference to the replacement, for example {{ settings.colors.accent }}. This keeps all existing references intact without updating every template that uses the deleted color.

    Tags
    Sources

    Related Articles

    Using React Bits as Inspiration for Stunning Shopify Frontend Effects
    Utilities/Tools

    Using React Bits as Inspiration for Stunning Shopify Frontend Effects

    Creating a beautiful Shopify storefront isn't just about great products—it's also about delivering an engaging user experience. Thoughtful animations and micro-interactions can make a store feel more modern, premium, and memorable

    July 31, 20262 min
    Optimize Your Shopify Store Images for Faster Load Times and Better SEO
    Utilities/Tools

    Optimize Your Shopify Store Images for Faster Load Times and Better SEO

    Discover the best image optimization tools and practices to speed up your Shopify store, improve user experience, and boost search engine rankings. Learn how to compress, resize, and optimize images for better performance. Get expert tips and recommendations for Shopify image optimization.

    July 26, 20262 min
    Top Productivity Tools for Shopify Store Owners: Automate Your Workflow
    Utilities/Tools

    Top Productivity Tools for Shopify Store Owners: Automate Your Workflow

    Discover the best productivity tools to help you automate daily business workflows, from debugging and image optimization to SEO checks and analytics. Learn how to boost your Shopify store's efficiency and productivity with our expert guide.

    July 10, 20263 min
    Shopify AI Toolkit: The Biggest Developer Upgrade in Shopify Spring '26
    Utilities/Tools

    Shopify AI Toolkit: The Biggest Developer Upgrade in Shopify Spring '26

    Among all the announcements in Shopify Spring '26 Edition, one feature stands out for developers: Shopify AI Toolkit. Instead of treating AI as just another coding assistant, Shopify is giving AI direct access to its development platform, making it significantly easier to build, validate, and manage Shopify applications

    July 3, 202610 min