summaryrefslogtreecommitdiff
path: root/cli/colors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/colors.rs')
-rw-r--r--cli/colors.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/colors.rs b/cli/colors.rs
index 5afd773cd..764704a5b 100644
--- a/cli/colors.rs
+++ b/cli/colors.rs
@@ -3,7 +3,7 @@ use regex::Regex;
use std::env;
use std::fmt;
use std::io::Write;
-use termcolor::Color::{Ansi256, Black, Red, White};
+use termcolor::Color::{Ansi256, Black, Magenta, Red, White};
use termcolor::{Ansi, ColorSpec, WriteColor};
#[cfg(windows)]
@@ -88,6 +88,12 @@ pub fn green(s: String) -> impl fmt::Display {
style(&s, style_spec)
}
+pub fn magenta(s: String) -> impl fmt::Display {
+ let mut style_spec = ColorSpec::new();
+ style_spec.set_fg(Some(Magenta));
+ style(&s, style_spec)
+}
+
pub fn bold(s: String) -> impl fmt::Display {
let mut style_spec = ColorSpec::new();
style_spec.set_bold(true);