lovelace-mushroom icon indicating copy to clipboard operation
lovelace-mushroom copied to clipboard

[Feature]: Allow gradients as icon color in template card

Open johannes-z opened this issue 2 years ago • 2 comments

Is your feature request related to a problem?

I was trying to make a linear gradient as the icon color in the template card, but it wraps the color inside rgb(...). For example, this:

linear-gradient(135deg, rgba(255,193,7,1) 0%, rgba(0,188,212,1) 100%)

becomes this:

rgb(linear-gradient(135deg, rgba(255,193,7,1) 0%, #00bcd4 100%))

Describe the solution you'd like

This is useful for color coding states. In my use case, I want to color code the template card for the following states:

  • any light is on (yellow)
  • window is open (blue)
  • if both is true, then show a linear-gradient from yellow to blue.

Maybe add a checkbox to use the icon color as it is, without any transformations afterwards? Or make a list of keyword to ignore the icon color, similar to the COLORS list.

Describe alternatives you've considered

No response

Additional context

No response

johannes-z avatar May 15 '22 13:05 johannes-z

Even if you specified it, it uses --shape-color for background-color, not background.

KTibow avatar Jul 01 '22 00:07 KTibow

great suggestion! seconded

ncd7 avatar Sep 11 '23 22:09 ncd7