feat: configurable colors

This commit is contained in:
Quixaq 2026-06-10 21:18:41 +02:00
commit b410fbe5a6
No known key found for this signature in database
4 changed files with 133 additions and 17 deletions

View file

@ -1,3 +1,5 @@
include!(concat!(env!("OUT_DIR"), "/colors_config.rs"));
use alloc::string::String;
/// Color codes for terminal output
@ -9,6 +11,11 @@ pub struct Colors {
pub yellow: &'static str,
pub red: &'static str,
pub magenta: &'static str,
pub l1: &'static str,
pub l2: &'static str,
pub icon: &'static str,
pub key: &'static str,
pub value: &'static str,
}
impl Colors {
@ -23,6 +30,11 @@ impl Colors {
yellow: "",
red: "",
magenta: "",
l1: "",
l2: "",
icon: "",
key: "",
value: "",
}
} else {
Self {
@ -33,6 +45,11 @@ impl Colors {
yellow: "\x1b[33m",
red: "\x1b[31m",
magenta: "\x1b[35m",
l1: COLOR_LOGO1,
l2: COLOR_LOGO2,
icon: COLOR_ICON,
key: COLOR_KEY,
value: COLOR_VAL,
}
}
}