Skip to content

Commit

Permalink
Fix color issues on switching to crossterm
Browse files Browse the repository at this point in the history
Not exactly sure what is going on. Default colors are set as dark
varients in crossterm and for example we have to use DarkBlue instead
of Blue when using crossterm.
  • Loading branch information
meain committed Sep 9, 2021
1 parent 0788c6f commit f3ff442
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ fn to_content_style(ls: &lscolors::Style) -> ContentStyle {
},
lscolors::style::Color::Fixed(n) => Color::AnsiValue(*n),
lscolors::style::Color::Black => Color::Black,
lscolors::style::Color::Red => Color::Red,
lscolors::style::Color::Green => Color::Green,
lscolors::style::Color::Yellow => Color::Yellow,
lscolors::style::Color::Blue => Color::Blue,
lscolors::style::Color::Magenta => Color::Magenta,
lscolors::style::Color::Cyan => Color::Cyan,
lscolors::style::Color::Red => Color::DarkRed,
lscolors::style::Color::Green => Color::DarkGreen,
lscolors::style::Color::Yellow => Color::DarkYellow,
lscolors::style::Color::Blue => Color::DarkBlue,
lscolors::style::Color::Magenta => Color::DarkMagenta,
lscolors::style::Color::Cyan => Color::DarkCyan,
lscolors::style::Color::White => Color::White,
};
let mut style = ContentStyle::default();
Expand Down
6 changes: 3 additions & 3 deletions src/color/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ impl Theme {
user: Color::AnsiValue(230), // Cornsilk1
group: Color::AnsiValue(187), // LightYellow3
permission: Permission {
read: Color::Green,
write: Color::Yellow,
exec: Color::Red,
read: Color::DarkGreen,
write: Color::DarkYellow,
exec: Color::DarkRed,
exec_sticky: Color::AnsiValue(5),
no_access: Color::AnsiValue(245), // Grey
},
Expand Down

0 comments on commit f3ff442

Please sign in to comment.