mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-12 10:37:39 +00:00
Improve visibility of green icons on white background (#1196)
This commit is contained in:
@@ -80,7 +80,7 @@ int Painter::draw_string(
|
|||||||
|
|
||||||
void Painter::draw_bitmap(Point p, const Bitmap& bitmap, Color foreground, Color background) {
|
void Painter::draw_bitmap(Point p, const Bitmap& bitmap, Color foreground, Color background) {
|
||||||
// If bright foreground colors on white background, darken the foreground color to improve visibility
|
// If bright foreground colors on white background, darken the foreground color to improve visibility
|
||||||
if ((background.v == ui::Color::white().v) && (foreground.to_greyscale() > 175))
|
if ((background.v == ui::Color::white().v) && (foreground.to_greyscale() > 146))
|
||||||
foreground = foreground.dark();
|
foreground = foreground.dark();
|
||||||
|
|
||||||
display.draw_bitmap(p, bitmap.size, bitmap.data, foreground, background);
|
display.draw_bitmap(p, bitmap.size, bitmap.data, foreground, background);
|
||||||
|
Reference in New Issue
Block a user