lubeda / EspHoMaTriXv2

A simple DIY status display with a 8x32 RGB LED matrix, implemented with esphome.io and Home Assistant.
MIT License
276 stars 25 forks source link

[FEATURE REQUEST] Add the ability to change the icon color #174

Open andrewjswan opened 9 months ago

andrewjswan commented 9 months ago

Feature Request

Describe the solution / feature you'd like

Let's say we have an icon with some image, but we need to display it in different colors (green, yellow, red) depending on the value. We call the service icon_set_color(icon_name, r ,g ,b) which changes all significant points of the icon to the specified color. Those. instead of three (or more) icons, we only need one, and we can display it in different colors.

lubeda commented 9 months ago

Hi, why not use the small bitmap command? I don't see the use case. Can you explain i little bit more or give a sample

andrewjswan commented 9 months ago

A bitmap is a way out, I agree, but only for static icons, and if we have an animated icon, for example lameid: 14429, then we won’t be able to use a bitmap.

lubeda commented 9 months ago

ok so you like to manipulate a dual color gif eg. black and red like in 14429 and you will change every red pixel to the specified color?

andrewjswan commented 9 months ago

Yes, but not everyone is red, and everyone is not black, i.e. If the color is displayed, change it to the one that is specified. And so on every call to this service.