Use color scheme color if dark scheme, otherwise use my color in theme

I think this is what you’re looking for:

So in color_definitions.scss you can do:

$my-theme-color: dark-light-choose($primary, red);

:root {
  --my-theme-color: #{$my-theme-color};
}

and then you’d use the new dark/light changing custom property in your theme:

body {
  color: var(--my-theme-color);
}
4 Likes