bar-card icon indicating copy to clipboard operation
bar-card copied to clipboard

[feature request] Icon and Text color

Open KameDomotics opened this issue 3 years ago • 4 comments

Would it be possible to implement the ability to customize the color of the icon (even static) and the color of the text? Thanks

KameDomotics avatar Jan 05 '22 22:01 KameDomotics

Yes please, as this just looks ugly:

image

VAFS001 avatar Jul 21 '22 17:07 VAFS001

@VAFS001 With card-mod installed, you can do something like this:

style: |-
        ha-icon {
         color: black;
        }

This is a full example to build a big bar card with black icons:

type: custom:bar-card
entities:
  - entity: sun.sun
    attribute: elevation
    min: 0
    max: 90
positions:
  icon: inside
  name: inside
  indicator: 'off'
style: |-
  bar-card-card {
    min-height: 140px;
    font-size: 5rem;
    line-height: 5.5rem;
  }
  bar-card-background {
    height: 100% !important;
  }
  bar-card-name {
    font-size: 3rem;
    line-height: 3.5rem;
  }
  ha-icon {
   --mdc-icon-size: 3rem;
   line-height: 3.5rem;
   color: black;
  }

big bar card

PulsarFX avatar Aug 07 '22 14:08 PulsarFX

No one is answering the part about the text color. Right now I use the bar-card in a picture-element object, and the picture has a white background. Can't figure how to apply any custom style cause the element object already has a style property (for positionning).

mlarchet avatar Sep 06 '23 10:09 mlarchet

No one is answering the part about the text color. Right now I use the bar-card in a picture-element object, and the picture has a white background. Can't figure how to apply any custom style cause the element object already has a style property (for positionning).

Here is an example with text color:

grafik

  bar-card-name {
    font-size: 3rem;
    line-height: 3.5rem;
    color: orange;
  }
  ha-icon {
   --mdc-icon-size: 3rem;
   line-height: 3.5rem;
   color: red;
  }

(replace in the example code from above) if it doesn't work, try with color: orange !important;

PulsarFX avatar Sep 06 '23 13:09 PulsarFX