How to define global colors/icons based on state

Dear Community,

Using customize.yaml I was able to define global icons for my entities

    icon: mdi:lightbulb
      icon: mdi:power-socket-de

Is it possible to define global state-based icons and colors in customize.yaml for light-entities without addons? And/or: How does it work?

Or is it possible to redefine HA-variables like var(–paper-item-icon-color)? Where can I do it?

Thanks in advance.

Regards from germany
Lars (absolute newbie)

You’re looking for themes.