mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-06-23 20:33:25 +00:00
feat: configurable colors
This commit is contained in:
parent
0c3d798f17
commit
b410fbe5a6
4 changed files with 133 additions and 17 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue