pub enum Colors {
Reset,
Black = 30,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White, Default = 39,
LightBlack = 90,
LightRed,
LightGreen,
LightYellow,
LightBlue,
LightMagenta,
LightCyan,
LightWhite, LightDefault = 99,
BackgroundBlack = 40,
BackgroundRed,
BackgroundGreen,
BackgroundYellow,
BackgroundBlue,
BackgroundMagenta,
BackgroundCyan,
BackgroundWhite, BackgroundDefault = 49,
BackgroundLightBlack = 100,
BackgroundLightRed,
BackgroundLightGreen,
BackgroundLightYellow,
BackgroundLightBlue,
BackgroundLightMagenta,
BackgroundLightCyan,
BackgroundLightWhite, BackgroundLightDefault = 109
}
pub enum Types {
Light ,
Bold ,
Dim ,
Italic ,
Underlined,
Blink ,
RapidBlink,
Reverse ,
Hidden }
pub mod colorful {
use crate::colorful::{ Colors, Types };
static ESC: &'static str = "\x1b";
pub fn ok(__color: Colors, __type: Types) -> String {
format!("{}[{};{}m", ESC, __type as u8, __color as u16)
}
pub fn make(__color: Colors, __type: Types, data: &String) -> String {
ok(__color, __type) + data
}
}