Switch node backround


Is it possible to change the backround colour dynamicly for a switch node depending the input?


when yo say "switch node" are you talking about the node in the editor, or the ui-switch in the dashboard?

For the dashboard, take a look at this for things you can change: https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md

Hi Im talking about the ui-switch. Can't se any property's to change bgcolor for this type in the link you posted.

Best regards Niclas

There is 3 elements in switch where background color can be changed.

All of them can be changed by overriding dashboard CSS using ui_template nodef
You can find basics from this thread šŸ–Œ Customize dashboard CSS


Have read a lot about css and have tested to change background in chrome developer tools.
But I don't understand haw I change backroad in the ui template?

Can someone give me an example how I use a template node to change background color for a ui-switch


Try this

        background-color:red !important;

Thanks. Will try this tomorrow.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.