diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-03-25 15:29:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 15:29:46 +0100 |
commit | fe88b53e50034e185246e03be586c470ca4fbf78 (patch) | |
tree | 298740b9a033f10d88a05dabe66e9bdbe1ffef25 /runtime | |
parent | e4c60bc1c658be762f59d3c22b4040777a5100f8 (diff) |
refactor: include mitata (#18426)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/colors.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/colors.rs b/runtime/colors.rs index c978e19c3..a9ad12e8c 100644 --- a/runtime/colors.rs +++ b/runtime/colors.rs @@ -10,6 +10,7 @@ use termcolor::Color::Black; use termcolor::Color::Blue; use termcolor::Color::Cyan; use termcolor::Color::Green; +use termcolor::Color::Magenta; use termcolor::Color::Red; use termcolor::Color::White; use termcolor::Color::Yellow; @@ -104,6 +105,17 @@ pub fn cyan<S: AsRef<str>>(s: S) -> impl fmt::Display { style_spec.set_fg(Some(Cyan)); style(s, style_spec) } +pub fn cyan_bold<S: AsRef<str>>(s: S) -> impl fmt::Display { + let mut style_spec = ColorSpec::new(); + style_spec.set_fg(Some(Cyan)).set_bold(true); + style(s, style_spec) +} + +pub fn magenta<S: AsRef<str>>(s: S) -> impl fmt::Display { + let mut style_spec = ColorSpec::new(); + style_spec.set_fg(Some(Magenta)); + style(s, style_spec) +} pub fn red<S: AsRef<str>>(s: S) -> impl fmt::Display { let mut style_spec = ColorSpec::new(); |