weirdnet-themes
A theme format for terminal and GUI front ends: one TOML file per theme with [meta],
[dark] and [light] tables, 21 semantic colour roles (palette names or #rrggbb),
seven built-in palettes, WCAG contrast checks and lightness-inverted variant generation.
- Storage is yours.
load,save,list,materializeandresetwork through theThemeDirstrait (a themes folder plus how to create folders and write files). - Mode.
Mode::{Light, Dark, System};resolve_variantmaps it to aVariant(Systemasks the terminal background with the defaultterminal-backgroundfeature, then the OS preference, else dark). - Colours.
VariantDef::resolve(role)gives RGB;to_hexgives#rrggbb(what a Dart or web front end consumes). With theratatuifeature,Theme::from_variantandto_colorgive ratatui colours byColorDepth. - Errors.
ThemeError(Invalid,Io,TomlSer).
let t = builtin.unwrap;
assert_eq!;