| Crates.io | wallust_themes |
| lib.rs | wallust_themes |
| version | 1.1.0 |
| created_at | 2024-02-02 22:24:37.803356+00 |
| updated_at | 2025-03-22 22:58:22.704825+00 |
| description | Embeded colorschemes in an array of u32s. |
| homepage | https://codeberg.org/explosion-mental/wallust-themes |
| repository | https://codeberg.org/explosion-mental/wallust-themes |
| max_upload_size | |
| id | 1124774 |
| size | 390,609 |
wallustThis is a simple crate that stores consts colorschemes in arrays (slices).
Indexing in either of COLS_VALUE or COLS_KEY will result in the array
values (see the spec) or the name of the colorscheme, that's why they both have
the same len()ght.
NOTE: COLS_VALUE and COLS_KEY will have the same LEN as the number of files in colorschemes/.
COLS_VALUE will always store the variables in this order (starting with index 0):
color0color1color2color3color4color5color6color7color8color9color10color11color12color13color14color15backgroundforegroundcursorMaking a total of 19 items. Each one of them is a u32 number that represents
[u8; 3] and can be decoded by .to_le_bytes()
Remember that COLS_VALUE is an array (quantity of coloschemes/) that
contains arrays (19 u32s, as defined above) itself.
use wallust_themes::COLS_VALUE;
let some_color = COLS_VALUE[0][0]; //random color
// a (alpha) will always be 0, since we don't use RGBA, but RGB
let [b, g, r, a] = some_color.to_le_bytes();
If you feel like a very well known colorscheme is missing, you should request it's addition with a json file following this format:
{
"colors": {
"color0": "#090300",
"color1": "#db2d20",
"color10": "#01a252",
"color11": "#fded02",
"color12": "#01a0e4",
"color13": "#a16a94",
"color14": "#b5e4f4",
"color15": "#f7f7f7",
"color2": "#01a252",
"color3": "#fded02",
"color4": "#01a0e4",
"color5": "#a16a94",
"color6": "#b5e4f4",
"color7": "#a5a2a2",
"color8": "#5c5855",
"color9": "#db2d20"
},
"special": {
"background": "#090300",
"cursor": "#db2d20",
"foreground": "#a5a2a2"
}
}
Enabled by default with the feature gogh, allows you to use all themes from Gogh
These schemes are not an original part of the library, hence credit is due at the Gogh repository.
For a more comfortable use, spaces " " are replaced with minus "-" and braquets "(" or ")" are not kept in the colorscheme name.