Hey Marius, you can do this:
type: custom:mushroom-template-card
primary: Mushroom
icon: mdi:mushroom
icon_color: var(--rgb-primary-color)
icon_color
needs to be RGB as Mushroom Cards use rgba() for the Icon Shape. You can also do icon_color: 255,0,255
etc.
The basic structure of every card is the same, with --icon-color
and --shape-color
under mushroom-shape-icon
. There is also --icon-color-disabled
, --icon-shape-disabled
and --shape-outline-color
that can be used. These can be any valid color, but you would need to handle the opacity for the Shape colors.
type: custom:mushroom-template-card
primary: Mushroom
icon: mdi:mushroom
card_mod:
style: |
mushroom-shape-icon {
--icon-color: rgb(var(--rgb-orange)) !important;
--shape-color: rgba(var(--rgb-orange), 0.2) !important;
}
For most of the cards there is a --rgb-state-[card_type]
variable that can be used, and sets the color for both the Icon and the Shape. This needs to be a RGB color.
For Primary Text the variable is --primary-text-color
and for Secondary Text it is --secondary-text-color
.
For the entity card it is --rgb-state-entity
:
type: custom:mushroom-entity-card
entity: input_boolean.mushroom
card_mod:
style: |
ha-card {
--rgb-state-entity: 255,0,0;
--primary-text-color: darkgreen;
--secondary-text-color: chartreuse;
}
You can also use --mush-rgb-state-[card_type]
in your theme or in :host
:
type: custom:mushroom-entity-card
entity: input_boolean.mushroom
card_mod:
style: |
:host {
--mush-rgb-state-entity: 255,0,255;
}
The `–mush-* variables are mostly documented in Paul’s Mushroom Theme Github:
I have posted some examples in the Mushroom Thread, have a look through my posts there.