summaryrefslogtreecommitdiff
path: root/cli/colors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/colors.rs')
-rw-r--r--cli/colors.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/colors.rs b/cli/colors.rs
index 764704a5b..b9a5a7353 100644
--- a/cli/colors.rs
+++ b/cli/colors.rs
@@ -52,6 +52,12 @@ pub fn red_bold(s: String) -> impl fmt::Display {
style(&s, style_spec)
}
+pub fn green_bold(s: String) -> impl fmt::Display {
+ let mut style_spec = ColorSpec::new();
+ style_spec.set_fg(Some(Ansi256(10))).set_bold(true);
+ style(&s, style_spec)
+}
+
pub fn italic_bold(s: String) -> impl fmt::Display {
let mut style_spec = ColorSpec::new();
style_spec.set_bold(true).set_italic(true);
@@ -64,6 +70,18 @@ pub fn black_on_white(s: String) -> impl fmt::Display {
style(&s, style_spec)
}
+pub fn white_on_red(s: String) -> impl fmt::Display {
+ let mut style_spec = ColorSpec::new();
+ style_spec.set_bg(Some(Red)).set_fg(Some(White));
+ style(&s, style_spec)
+}
+
+pub fn white_on_green(s: String) -> impl fmt::Display {
+ let mut style_spec = ColorSpec::new();
+ style_spec.set_bg(Some(Ansi256(10))).set_fg(Some(White));
+ style(&s, style_spec)
+}
+
pub fn yellow(s: String) -> impl fmt::Display {
let mut style_spec = ColorSpec::new();
style_spec.set_fg(Some(Ansi256(11)));