| Crates.io | rat-theme4 |
| lib.rs | rat-theme4 |
| version | 4.5.2 |
| created_at | 2025-11-06 20:23:18.696719+00 |
| updated_at | 2026-01-15 22:23:20.360445+00 |
| description | dark theme and color-schemes |
| homepage | |
| repository | https://github.com/thscharler/rat-salsa |
| max_upload_size | |
| id | 1920281 |
| size | 487,590 |
This crate is a part of rat-salsa.
This splits themes in two parts,
Palette
This defines a color palette. It contains a rainbow-table,
explicit primary, secondary colors and light/bright/dark/black
text-colors.
Plus it contains a list of aliases for semantic colors. e.g.: "label-fg", "focus", "select", "container-base" These point to specific colors in the palette and can be used to create the actual theme composition.
SalsaTheme
Takes a palette and creates Styles.
And it creates concrete xxStyle structs to configure
specific rat-widgets. It can also store yyStyle structs
for your own widgets.
There is pal-edit a visual editor for palettes.
It can create the .rs palettes and has its own storage format too.
And, it can be configured to use extra aliases needed by your
application.
pal-edit can manage additional aliases for colors.
You can use that to generate palettes directly or to generate
a patch.rs which adds the aliases to a Palette.
From there you go on to create your own SalsaTheme or you can patch an existing one.
It's doable. The .pal files are sufficient to create a Palette, but it's not implemented yet.