Is there any way to change Lumo variable programmatically ?

I need to change the Lumo variable color dynamically by programmatically (Java Code).

In my application, user will select the color of application by color picker and the whole platform color will change.

So I need to change Lumo variable programmatically.

I tried with following code.

getElement().getStyle().set(“–variable”, “red”);

It’s working on firefox but it’s now working on Microsoft Edge.

If there is something similar to “Google’s Developer Tools” for Edge, maybe it will help you to see which variable is setting definitively the color you want to change. I cannot help you more as I am an eternal beginner to Vaadin and its quick changes of version.

Ximo Dante:
If there is something similar to “Google’s Developer Tools” for Edge, maybe it will help you to see which variable is setting definitively the color you want to change. I cannot help you more as I am an eternal beginner to Vaadin and its quick changes of version.

Thanks for your suggestion

This helps me to change the variable. I added this line into my app layout and it’s working.

getElement().getStyle().set(“–variable”, “red”);

Hi, thank you. I will try it!