Change $brand-primary based on attribute

Hi all, Case: [I want to select a color via a color-picker. This color is used through the whole application as the $brand-primary]. Does anybody knows how to do this and if it's possible?   Martijn Jansen
1 answers

In this case you can try mapping $brand-primary to a CSS custom property and some JavaScript to assign the value of the captured color. 

Sass variables are compiled but CSS custom properties are available at run time

$brand-primary: var(--userColor);