mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-06 21:54:27 -04:00
Update menu icons colors per app state & add contrast to bright icons for improved visibility when Selected (#1189)
* Orange icons vs yellow * Update app icon colors per current development states * Darken bright icons on white backgrounds * Darken bright icons on white backgrounds
This commit is contained in:
parent
996ccb0e40
commit
960ecf616c
3 changed files with 21 additions and 12 deletions
|
@ -56,15 +56,20 @@ struct Color {
|
|||
}
|
||||
|
||||
uint8_t to_greyscale() {
|
||||
uint32_t r = ((v >> 11) & 31U) << 3;
|
||||
uint32_t g = ((v >> 5) & 63U) << 2;
|
||||
uint32_t b = (v & 31U) << 3;
|
||||
uint32_t r = (v >> 8) & 0xf8;
|
||||
uint32_t g = (v >> 3) & 0xfc;
|
||||
uint32_t b = (v << 3) & 0xf8;
|
||||
|
||||
uint32_t grey = (r * 299 + g * 587 + b * 114) / 1000;
|
||||
uint32_t grey = ((r * 306) + (g * 601) + (b * 117)) >> 10;
|
||||
|
||||
return (uint8_t)grey;
|
||||
}
|
||||
|
||||
uint16_t dark() {
|
||||
// stripping bits 4 & 5 from each of the colors R/G/B
|
||||
return (v & ((0xc8 << 8) | (0xcc << 3) | (0xc8 >> 3)));
|
||||
}
|
||||
|
||||
Color operator-() const {
|
||||
return (v ^ 0xffff);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue