Expand description
Red Bear OS — default TUI skin palette.
Single source of truth for the Red Bear brand colours used by every
TUI application on Red Bear OS (tlc, cub, redbear-info,
redbear-netctl-console, redbear-wifictl, redbear-btctl, the
redbear-mtr family, redbear-hwutils, and any future TUI).
See local/docs/RED-BEAR-TUI-THEME.md for the design rationale,
WCAG contrast ratios, and migration plan.
The palette is deliberately ratatui-free at this layer. Apps
that want a ratatui::style::Color from a slot do a single
one-line conversion: Color::Rgb(t.background.0, t.background.1, t.background.2). Keeping this crate free of ratatui means
non-ratatui TUI libs (cursive, termion-direct, etc.) can also
consume the palette.
§Example
use redbear_tui_theme::REDBEAR_DARK;
// Render a selection row in a TUI list.
let bg = REDBEAR_DARK.selection_bg;
let fg = REDBEAR_DARK.selection_fg;
assert_eq!((bg.0, bg.1, bg.2), (0x36, 0x52, 0xA0));
assert_eq!((fg.0, fg.1, fg.2), (0xF4, 0xF4, 0xF4));§Brand red
The accent colour #B52430 is the same red used by cub’s
already-shipped RedBearTheme and by the Red Bear OS brand
assets (local/Assets/images/Red Bear OS icon.png and the
loading background). It is byte-identical in both the
dark and light themes; only the background flips.
Modules§
- fallback
- Terminal-fallback colour resolution.
Structs§
- Rgb
- A 24-bit RGB colour. Deliberately not a re-export of
ratatui::style::Color::Rgbso this crate stays free of any TUI library dependency. - Theme
- A complete color theme. All slots are truecolor
Rgb(u8, u8, u8).
Constants§
- REDBEAR_
DARK - The default dark theme. All foreground/background pairs in this
theme pass WCAG 2.1 AA-body (4.5:1) except
dimandborderis tuned to AA-body, and thedim/hiddenslot which is intentionally 2.9:1 for de-emphasis. - REDBEAR_
LIGHT - The light theme. Brand red is identical to the dark theme — only
the background flips. See
REDBEAR_DARKfor the slot semantics.