Add Icon Color as Attribute

Is there a possibility to set up a specific color for the icon?

I use the graph cards for energy consumption and I would like to have a switch icon which changes color and image depending on the state of the switch (on or off). Therefor an attribute to set the icon color would be appricated.

Totally agree on this one. A template supported color option would be very useful.