custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.97k stars 242 forks source link

Card color in off state is reverted, when color is defined with RGB #754

Open fxxer opened 1 year ago

fxxer commented 1 year ago

Checklist

Describe the bug I have one more issue with card color, if I define color as var(--paper-item-icon-color), then the color of the card in off state is reverted. It should be as the color of covers buttons in screenshot. Same applies for color defined as rgb(0, 122, 255). More info in the previous ticket https://github.com/custom-cards/button-card/issues/737

Light Mode Screenshot 2023-08-03 at 19 33 07

Dark Mode Screenshot 2023-08-03 at 19 33 50

button_card_templates:
  switch:
    hold_action:
      action: more-info
    tap_action:
      action: toggle
    type: custom:button-card
    color: var(--paper-item-icon-active-color)
    color_type: card
    state:
      - value: 'on'
        styles:
          icon:
            - color: white
          name:
            - color: white