you can make it work with dynamic class.
On your page, you have an object with a boolean attribute.
if you click on the red button. you change that attribute to true.
if you click on the blue button you change that attribute to false.
Then in the dynamic class on a container of your page, you put a condition on the object.
something like :
if $currentObject/attribute then '.red’ else
then you define the style that you want in the class .red and .blue (inside main.scss).
we use css-variables for this.
it depends on how far you want to take this, I think the easiest solution would be to have a non persistent entity that has a boolean, and then you can just toggle a class such as “bg-danger” and “bg-primary”.
but if you want to go down a fully customizable UI, def dive into css-variables