Skip to content

Commit

Permalink
feat(theme): Add an initial rgb style with nicer colors
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Aug 22, 2021
1 parent eb4ea34 commit 3546dce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/printer/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3546dce

Please sign in to comment.