Please add global color JSON to your parameters documentation

What is the correct syntax for referencing a global color ID in a JSON parameter to set the initial color from the palette? Please include this in your documentation: https://theme.co/docs/parameters

Hey @threeoten,

Thanks for writing in!

You can use Global dynamic content like {{dc:global:color id="idnameofthecolor"}}. You can access it by enabling the Dev Toolkit in the builder.

Hope this helps.

Here’s an example of how to use this in CSS.

But I’m asking how to reference a global color in a JSON parameter.

Hello @threeoten,

You can use it something like this:

"backgroundColor" : {
            "type"       : "color",
            "label"      : "Background",
            "initial"    : "global-color:idnameofthecolor",
            "isVar"      : true,
            "responsive" : false
          }

We will update the documentation shortly. Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.