From 42149265d4d4498d64d1013ce0208d4de0cc1d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 17 Feb 2017 16:14:33 +0100 Subject: [PATCH] [escher] Function colors Change-Id: I97c9ee9be8bf234944c7df4fc6756f19c98baf54 --- apps/graph/cartesian_function_store.h | 5 +++-- apps/sequence/sequence_store.h | 3 ++- escher/include/escher/palette.h | 7 +++++++ escher/src/palette.cpp | 7 +++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/apps/graph/cartesian_function_store.h b/apps/graph/cartesian_function_store.h index ffc465b60..7c9ef8b40 100644 --- a/apps/graph/cartesian_function_store.h +++ b/apps/graph/cartesian_function_store.h @@ -4,6 +4,7 @@ #include "cartesian_function.h" #include "../shared/function_store.h" #include +#include namespace Graph { @@ -23,8 +24,8 @@ private: const KDColor firstAvailableColor() override; static constexpr int k_numberOfDefaultColors = 8; static constexpr KDColor k_defaultColors[k_numberOfDefaultColors] = { - KDColor::RGB24(0xbe2727), KDColor::RGB24(0x3e6f3c), KDColor::RGB24(0x656975), KDColor::RGB24(0x9ec580), - KDColor::RGB24(0xffb734), KDColor::RGB24(0x4a94ab), KDColor::RGB24(0xf98577), KDColor::RGB24(0xd4ac46) + Palette::Red, Palette::Blue, Palette::YellowDark, Palette::Magenta, + Palette::Pink, Palette::Turquoise, Palette::Orange, Palette::Green }; static constexpr const char * k_functionNames[k_maxNumberOfFunctions] = { "f", "g", "h", "p", "q", "r", "s", "t" diff --git a/apps/sequence/sequence_store.h b/apps/sequence/sequence_store.h index e25dda2c8..11f96740a 100644 --- a/apps/sequence/sequence_store.h +++ b/apps/sequence/sequence_store.h @@ -4,6 +4,7 @@ #include "sequence.h" #include "../shared/function_store.h" #include +#include namespace Sequence { @@ -22,7 +23,7 @@ public: private: const KDColor firstAvailableColor() override; static constexpr KDColor k_defaultColors[k_maxNumberOfSequences] = { - KDColor::RGB24(0xbe2727), KDColor::RGB24(0x3e6f3c), KDColor::RGB24(0x656975) + Palette::Red, Palette::Blue, Palette::YellowDark }; static constexpr const char * k_sequenceNames[k_maxNumberOfSequences] = { "u", "v", "w" diff --git a/escher/include/escher/palette.h b/escher/include/escher/palette.h index de8ea0beb..40b36676c 100644 --- a/escher/include/escher/palette.h +++ b/escher/include/escher/palette.h @@ -18,6 +18,13 @@ public: constexpr static KDColor WallScreenDark = KDColor::RGB24(0xe0e6ed); constexpr static KDColor SubTab = KDColor::RGB24(0xb8bbc5); constexpr static KDColor LowBattery = KDColor::RGB24(0xf30211); + constexpr static KDColor Red = KDColor::RGB24(0xff000c); + constexpr static KDColor Magenta = KDColor::RGB24(0xff0588); + constexpr static KDColor Turquoise = KDColor::RGB24(0x60c1ec); + constexpr static KDColor Pink = KDColor::RGB24(0xffabb6); + constexpr static KDColor Blue = KDColor::RGB24(0x5075f2); + constexpr static KDColor Orange = KDColor::RGB24(0xfe871f); + constexpr static KDColor Green = KDColor::RGB24(0x76d435); }; #endif diff --git a/escher/src/palette.cpp b/escher/src/palette.cpp index 04dacdbd0..f647efedc 100644 --- a/escher/src/palette.cpp +++ b/escher/src/palette.cpp @@ -13,3 +13,10 @@ constexpr KDColor Palette::WallScreen; constexpr KDColor Palette::WallScreenDark; constexpr KDColor Palette::SubTab; constexpr KDColor Palette::LowBattery; +constexpr KDColor Palette::Red; +constexpr KDColor Palette::Magenta; +constexpr KDColor Palette::Turquoise; +constexpr KDColor Palette::Pink; +constexpr KDColor Palette::Blue; +constexpr KDColor Palette::Orange; +constexpr KDColor Palette::Green;