InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.63k stars 902 forks source link

BatteryIcon: Change color with charge percentage #1964

Open vkareh opened 5 months ago

vkareh commented 5 months ago

Silly little change to dynamically color the battery based on the charge left.

battery

github-actions[bot] commented 5 months ago
Build size and comparison to main: Section Size Difference
text 377384B 176B
data 940B 0B
bss 63556B 0B
minacode commented 5 months ago

Nice idea, I like it a lot! 😊 I think you could improve the contrast a little by using HSV colors and mapping the percentage to the hue interval between red and green. The brown in the second picture would become yellow. Lvgl can do the conversion to RGB.

vkareh commented 5 months ago

@minacode That's a brilliant suggestion! I've updated the code and added a new screenshot - looks way better, thanks!

z3t0 commented 3 months ago

I love this change. Thank you.