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:
Mark Thompson 2023-06-25 12:48:51 -05:00 committed by GitHub
parent 996ccb0e40
commit 960ecf616c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 12 deletions

View file

@ -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);
}