Background when activated

Hello everyone.
Can anyone help me? Is it possible to make it so that when an entity is active, the background of that entity changes to white and when it is deactivated, it remains grey? (as in the example in the photo, the photo is in lovelace).
Another question, is it possible to round the corners more?

My HaDasboard:

My Lovelace:

Thanks

Yes, but the method depends on the card type you are using. Are the cards in your pics custom:button-card?

In the second photo, yes, it’s not Lovelace in the home assistant, it’s all “custom:button-card” cards, with templates and so on… in the first photo, can I also use cards?

An example…

type: custom:button-card
entity: light.pc_lights
state:
  - value: "on"
    styles:
      card:
        - background: orange
      icon:
        - color: blue
  - value: "off"
    styles:
      card:
        - background: grey
      icon:
        - color: black
1 Like

Yes, but I already have that. As I show in the second photo, I wanted HaDashboard (appdaemon) to be able to do this too (first photo). I don’t know if I can explain myself…

I apologize, I understand now and will take a second look.

ok, i appreciate it

Any news my friend? Is it possible to do it?