diff options
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(); |