diff --git a/ansi/src/util.rs b/ansi/src/util.rs index b2cc792..fd7fbca 100644 --- a/ansi/src/util.rs +++ b/ansi/src/util.rs @@ -11,6 +11,16 @@ pub(crate) fn foreground(color: Color) -> &'static str { Color::Cyan => "36", Color::White => "37", Color::Default => "39", + + Color::BrightBlack => "90", + Color::BrightRed => "91", + Color::BrightGreen => "92", + Color::BrightYellow => "93", + Color::BrightBlue => "94", + Color::BrightMagenta => "95", + Color::BrightCyan => "96", + Color::BrightWhite => "97", + _ => "39", } } @@ -26,6 +36,16 @@ pub(crate) fn background(color: Color) -> &'static str { Color::Cyan => "46", Color::White => "47", Color::Default => "49", + + Color::BrightBlack => "100", + Color::BrightRed => "101", + Color::BrightGreen => "102", + Color::BrightYellow => "103", + Color::BrightBlue => "104", + Color::BrightMagenta => "105", + Color::BrightCyan => "106", + Color::BrightWhite => "107", + _ => "49", } } diff --git a/html/src/util.rs b/html/src/util.rs index 71e8fca..76ac30e 100644 --- a/html/src/util.rs +++ b/html/src/util.rs @@ -11,6 +11,16 @@ pub(crate) fn foreground(color: Color) -> &'static str { Color::Cyan => "color:cyan", Color::White => "color:white", Color::Default => "color:inherit", + + Color::BrightBlack => "color:gray", + Color::BrightRed => "color:#af0000", + Color::BrightGreen => "color:#00ff00", + Color::BrightYellow => "color:#ffff00", + Color::BrightBlue => "color:#0000ff", + Color::BrightMagenta => "color:#ff00ff", + Color::BrightCyan => "color:#00ffff", + Color::BrightWhite => "color:#ffffff", + _ => "color:inherit", } } @@ -26,6 +36,16 @@ pub(crate) fn background(color: Color) -> &'static str { Color::Cyan => "background-color:cyan", Color::White => "background-color:white", Color::Default => "background-color:inherit", + + Color::BrightBlack => "background-color:gray", + Color::BrightRed => "background-color:#af0000", + Color::BrightGreen => "background-color:#00ff00", + Color::BrightYellow => "background-color:#ffff00", + Color::BrightBlue => "background-color:#0000ff", + Color::BrightMagenta => "background-color:#ff00ff", + Color::BrightCyan => "background-color:#00ffff", + Color::BrightWhite => "background-color:#ffffff", + _ => "background-color:inherit", } } diff --git a/style/src/lib.rs b/style/src/lib.rs index c55efab..1ff2234 100644 --- a/style/src/lib.rs +++ b/style/src/lib.rs @@ -32,6 +32,22 @@ pub enum Color { Cyan, /// White White, + // Bright Black + BrightBlack, + // Bright Red + BrightRed, + // Bright Green + BrightGreen, + // Bright Yellow + BrightYellow, + // Bright Blue + BrightBlue, + // Bright Magenta + BrightMagenta, + // Bright Cyan + BrightCyan, + // Bright White + BrightWhite, /// Default color Default, }