Changing switch foreground color dynamicly

I have 4 buttons which should change the foreground color when pressed. I have this working on DB 1. The active button is white and the rest is black.

image

how does this work on DB 2?

I posted an example flow at https://discourse.nodered.org/t/css-styling-ui-button-widgets-on-dashboard-2/90969 showing some examples of styling ui-buttons on dashboard 2, including changing the button label colour (see the Bilge Pump button)

ps your picture shows a switch and 4 buttons. I assume, despite the title, that you are referring to the buttons?

1 Like

That was a fast and helpful response.
This is exactly what I need!
Thank you very much :+1: :slightly_smiling_face: