summaryrefslogtreecommitdiff
path: root/cli/colors.rs
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2020-03-01 13:17:45 -0800
committerGitHub <noreply@github.com>2020-03-01 16:17:44 -0500
commitc3661e9f0731c8e6d2952de23eaeaaa1dc6ca4da (patch)
treef8aef863ff6abdfb884dac0d213ec35f12d643a4 /cli/colors.rs
parentba0991ad2ba89b7a788a866419759d858b125663 (diff)
Make internel error frames dimmer (#4201)
Diffstat (limited to 'cli/colors.rs')
-rw-r--r--cli/colors.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/colors.rs b/cli/colors.rs
index 17b8b7aba..056a6e0d0 100644
--- a/cli/colors.rs
+++ b/cli/colors.rs
@@ -92,3 +92,18 @@ pub fn bold(s: String) -> impl fmt::Display {
style_spec.set_bold(true);
style(&s, style_spec)
}
+
+pub fn gray(s: String) -> impl fmt::Display {
+ let mut style_spec = ColorSpec::new();
+ style_spec.set_fg(Some(Ansi256(8)));
+ style(&s, style_spec)
+}
+
+pub fn italic_bold_gray(s: String) -> impl fmt::Display {
+ let mut style_spec = ColorSpec::new();
+ style_spec
+ .set_fg(Some(Ansi256(8)))
+ .set_bold(true)
+ .set_italic(true);
+ style(&s, style_spec)
+}