How to change icon color

I’m willing to help, I’m using an input_text helper to simulate your config

type: glance
entities:
  - entity: input_text.a_qui_le_tour
    icon: phu:duco-logo
    name: Mode
    card_mod:
      style: |
        :host {
          {% if states(config.entity) == 'Perm.High' %}
            --paper-item-icon-color: red;
          {% endif %}
        }

As a result,when it is “Perm.High”:
image
And when it is not
image
But next time, try to format your code.

How do I Format my Code? This is still not working.

Select the code part, the click the </> here
image