Sadly I think this is not so easy to accomplish in runtime. You would have to call some javascript to replace all the color-definitions in the css. Or you could use CSS variables (as far as I know not supported in every browser) and set them on pageload. But I can't promise, that it will work.
we ended up using:
https://forum.mendix.com/link/questions/86103
StyleSheet switcher Widget
Style switching is very interesting
Instead of using that widget, for performance reasons, you can serve up the CSS on either an request handler or PRS
Unfortunately SASS is a bit complicated to implement in a runtime workflow but is possible using something like libsass, but creating a managable runtime interface for this is overkill
It really helps to have all of this runtime configurable especially on fully branded multitenant projects where each mendix website is supposed to look unique but runs off the same server, and you want to add styles and not deploy for nonsense. You also need to program some interfaces to manage, edit, export, import, and remote transfer your styles.
Styles
Fragments
Editor
If anybody has come up with a workable server side sass implementation within the Mx runtime, I’d be very interested in finding out more