Public Access
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
30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
// The colour themes (issue #10): each a dark and a light set of the same roles, as RGB565.
|
|
namespace roro::ui {
|
|
|
|
struct Palette {
|
|
uint16_t background, text;
|
|
uint16_t muted; // secondary text
|
|
uint16_t faint; // grid lines, what stays behind
|
|
uint16_t bar; // the Status Bar's background
|
|
uint16_t barMuted; // what is idle, on the bar
|
|
uint16_t accent; // what is chosen, what is live: also the fill behind a selected row
|
|
uint16_t onAccent; // text on an accent, warning or message fill
|
|
uint16_t warning;
|
|
uint16_t message; // someone wrote
|
|
uint16_t good; // a Fix, the best of a set
|
|
uint16_t red, yellow, violet; // to tell things apart (the constellations of the Sky view)
|
|
};
|
|
|
|
constexpr int kThemeCount = 7;
|
|
const char* themeName(int theme); // "roro9stack", "Catppuccin", "Dracula", ...
|
|
const Palette& palette(int theme, bool light); // out of range: the first
|
|
|
|
// What the 8-bit frame buffer shows for a colour, as 0xRRGGBB.
|
|
uint32_t rgb888(uint16_t rgb565);
|
|
|
|
} // namespace roro::ui
|