Yes but as soon as I put the variables into a settings.yml like this, it does not work for me. I get an error saying $color is not a color even though I am not using a $color variable here. So I assume it may be related to an interpolation thing that I don’t understand.
In my mind, it seems like this is about how the CSS is compiled. the variables work when declared at the CSS run time, but not dynamically via separate settings.yml file.
Short answer: Themes and CSS variables are considered strings and, while you can use them in attributes such as color, background, border and so on, they can’t be used in SCSS color functions.