diff options
author | Aram Drevekenin <aram@poor.dev> | 2021-05-04 16:06:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 16:06:55 +0200 |
commit | 1f88b342e2a381b958da4bebd852b73e42db1a8c (patch) | |
tree | 0edaf24bdfbe85c0f51a71ecf26a29d626d9e25d /default-plugins/tab-bar/src/main.rs | |
parent | f2f20f676fbcc408feac75d92d80d221a43b433e (diff) |
fix(colors): stabilize colors (#453)
* fix(colors): stabilize colors
* style(fmt): rustfmt
Diffstat (limited to 'default-plugins/tab-bar/src/main.rs')
-rw-r--r-- | default-plugins/tab-bar/src/main.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs index 1c6d584e3..c62770137 100644 --- a/default-plugins/tab-bar/src/main.rs +++ b/default-plugins/tab-bar/src/main.rs @@ -68,12 +68,13 @@ impl ZellijPlugin for State { for bar_part in tab_line { s = format!("{}{}", s, bar_part.part); } - println!( - "{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", - s, - self.mode_info.palette.bg.0, - self.mode_info.palette.bg.1, - self.mode_info.palette.bg.2 - ); + match self.mode_info.palette.bg { + PaletteColor::Rgb((r, g, b)) => { + println!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", s, r, g, b); + } + PaletteColor::EightBit(color) => { + println!("{}\u{1b}[48;5;{}m\u{1b}[0K", s, color); + } + } } } |