Is there a way to make color card based on state globaly

Hi
Currently I use card mod add on to set the background of some entities so when they on it will have different color .
What I want/need is instead of going over all cards and set the code maybe one place that will hold the logic and cards will point to it or better that I will enable it somewhere and all dashboard cards will inherent this .

card-mod-theme
Goto a dedicated thread in the Comminity.

Thanks a lot .
Checking it now but it seems exactly what I needed … and more