Theme.json: creating different sections of the color palette

Question

I’ve got some colors defined in theme.json- is there a way to define custom sections within the color palette? When I set my own colors, they show up in the section labeled “Theme”. The other colors are in a section labeled “Default”. [seen below] Is there a way to define new sections here?

WordPress color picker

Use case: We have a pretty big palette, and I want to split up brand colors (each include a x-light, light, key, dark, and x-dark shade).

Here is my theme.json code:

{
  "version": 1,
  "settings": {
    "color": {
      "palette": [
        {
          "name": "Primary",
          "slug": "primary",
          "color": "#0EA5E9"
        },
        {
          "name": "Secondary",
          "slug": "secondary",
          "color": "#14B8A6"
        }...

I did a fair bit of Googling but can’t seem to land on the right term to unlock the secret. Anyone tried this before?

0
clark 1 week 2022-09-20T11:45:07-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse