2021-10-13 16:08:35 -04:00
|
|
|
#include "displayapp/Colors.h"
|
2021-08-28 15:02:11 -04:00
|
|
|
|
|
|
|
using namespace Pinetime::Applications;
|
|
|
|
using namespace Pinetime::Controllers;
|
|
|
|
|
|
|
|
lv_color_t Pinetime::Applications::Convert(Pinetime::Controllers::Settings::Colors color) {
|
|
|
|
switch (color) {
|
|
|
|
case Pinetime::Controllers::Settings::Colors::White: return LV_COLOR_WHITE;
|
|
|
|
case Pinetime::Controllers::Settings::Colors::Silver: return LV_COLOR_SILVER;
|
|
|
|
case Pinetime::Controllers::Settings::Colors::Gray: return LV_COLOR_GRAY;
|
|
|
|
case Pinetime::Controllers::Settings::Colors::Black: return LV_COLOR_BLACK;
|
|
|
|
case Pinetime::Controllers::Settings::Colors::Red: return LV_COLOR_RED;
|
2022-04-22 16:26:38 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Maroon: return lv_color_lighten(LV_COLOR_MAROON, LV_OPA_20);
|
2021-08-28 15:02:11 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Yellow: return LV_COLOR_YELLOW;
|
2022-04-22 16:26:38 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Olive: return lv_color_lighten(LV_COLOR_OLIVE, LV_OPA_20);
|
2021-08-28 15:02:11 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Lime: return LV_COLOR_LIME;
|
2022-04-22 16:26:38 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Green: return lv_color_lighten(LV_COLOR_GREEN, LV_OPA_20);
|
2021-08-28 15:02:11 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Cyan: return LV_COLOR_CYAN;
|
2022-04-22 16:26:38 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Teal: return lv_color_lighten(LV_COLOR_TEAL, LV_OPA_20);
|
2021-08-28 15:02:11 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Blue: return LV_COLOR_BLUE;
|
2022-04-22 16:26:38 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Navy: return lv_color_lighten(LV_COLOR_NAVY, LV_OPA_20);
|
2021-08-28 15:02:11 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Magenta: return LV_COLOR_MAGENTA;
|
2022-04-22 16:26:38 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Purple: return lv_color_lighten(LV_COLOR_PURPLE, LV_OPA_20);
|
2021-08-28 15:02:11 -04:00
|
|
|
case Pinetime::Controllers::Settings::Colors::Orange: return LV_COLOR_ORANGE;
|
|
|
|
default: return LV_COLOR_WHITE;
|
|
|
|
}
|
|
|
|
}
|