Can the value of the global colors be made dependent on the color-scheme preference of the browser?
For example, in CSS, I can write
:root { color-scheme: light dark; --bgColor: light-dark(#fafafa, #171717); }
With this, the background color var(--bgColor)
will depend on the preferred color scheme of the browser.
Global colors in cornerstone are defined by JSON statements like
{
“title”: “Background”,
“value”: “#fafafa”,
“_id”: “bgColor”
},
Can the “value” here be made dependent on the preferred color scheme of the browser, similar to CSS?
What actually DOES work is this definition: "value" = "var(--bgColor)"
. But this means that the actual color definition is in CSS, not in the global colors. And furthermore, the swatch in the color palette does not show the color with this “var” definition, even though the element on the page (and in the cornerstone preview) does show the correct color.