Public Access
UI: seven themes, each dark and light, chosen in the Settings
Settings > Theme and Settings > Light or dark pick the colours of every screen (issue #10): roro9stack (the website's, the default), Catppuccin, Dracula, Nord, ANSI terminal, Gruvbox and Solarized. - A palette is 14 roles (lib/ui/src/palette.h). theme::kText and the others are now references into the one in use, so the Apps are unchanged; the main loop applies it when a Setting changes. - Every colour is one the RGB332 frame buffer holds exactly: the themes' own were rounded, and those that fell together or lost contrast were picked by hand. test_palette checks exactness and 18 contrast ratios for each palette. - The Sky view's constellation colours come from the theme. - `theme [0-6] [light|dark]` on the consoles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
This commit is contained in:
@@ -17,14 +17,14 @@ using namespace gnss;
|
||||
|
||||
namespace {
|
||||
|
||||
// One colour per constellation, readable in the 8-bit frame buffer.
|
||||
// One colour per constellation, from the theme: readable on its background.
|
||||
uint16_t colorOf(Constellation c) {
|
||||
switch (c) {
|
||||
case Constellation::Gps: return theme::kAccent;
|
||||
case Constellation::Glonass: return 0xF8C8; // red
|
||||
case Constellation::Glonass: return theme::kRed;
|
||||
case Constellation::Galileo: return theme::kGood;
|
||||
case Constellation::BeiDou: return 0xFEA0; // yellow
|
||||
case Constellation::Qzss: return 0xC99F; // violet
|
||||
case Constellation::BeiDou: return theme::kYellow;
|
||||
case Constellation::Qzss: return theme::kViolet;
|
||||
default: return theme::kText;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user