zellij_tile_extra/
lib.rs

1#[macro_export]
2macro_rules! rgb {
3    ($a:expr) => {
4        ansi_term::Color::Rgb($a.0, $a.1, $a.2)
5    };
6}
7
8#[macro_export]
9macro_rules! style {
10    ($fg:expr, $bg:expr) => {
11        ansi_term::Style::new()
12            .fg(match $fg {
13                PaletteColor::Rgb((r, g, b)) => ansi_term::Color::RGB(r, g, b),
14                PaletteColor::EightBit(color) => ansi_term::Color::Fixed(color),
15            })
16            .on(match $bg {
17                PaletteColor::Rgb((r, g, b)) => ansi_term::Color::RGB(r, g, b),
18                PaletteColor::EightBit(color) => ansi_term::Color::Fixed(color),
19            })
20    };
21}