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);
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties