From 3546dcec988ea40cc6aa8dd94c29432830cef662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sun, 22 Aug 2021 10:56:10 -0700 Subject: [PATCH] feat(theme): Add an initial `rgb` style with nicer colors --- src/printer/theme.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/printer/theme.rs b/src/printer/theme.rs index 89cecdef..9a00f9e4 100644 --- a/src/printer/theme.rs +++ b/src/printer/theme.rs @@ -94,6 +94,27 @@ fn style() -> Style { } impl ThemeStyles { + /// Nice RGB colors. + /// Credit: http://terminal.sexy/#FRUV0NDQFRUVrEFCkKlZ9L91ap-1qnWfdbWq0NDQUFBQrEFCkKlZ9L91ap-1qnWfdbWq9fX1 + pub fn rgb() -> Self { + Self { + error: style().fg_rgb::<172, 65, 66>(), + warning: style().fg_rgb::<244, 191, 117>(), + advice: style().fg_rgb::<106, 159, 181>(), + code: style().fg_rgb::<170, 117, 159>(), + help: style().fg_rgb::<106, 159, 181>(), + filename: style().fg_rgb::<117, 181, 170>().underline().bold(), + highlights: vec![ + style().fg_rgb::<255, 135, 162>(), + style().fg_rgb::<150, 232, 133>(), + style().fg_rgb::<62, 238, 210>(), + style().fg_rgb::<234, 207, 182>(), + style().fg_rgb::<130, 221, 255>(), + style().fg_rgb::<255, 188, 242>(), + ], + } + } + /// ANSI color-based styles. pub fn ansi() -> Self { Self {