macro_rules! define_theme {
(
bg: ($bg_r:expr, $bg_g:expr, $bg_b:expr),
bg_alt: ($bg_alt_r:expr, $bg_alt_g:expr, $bg_alt_b:expr),
fg: ($fg_r:expr, $fg_g:expr, $fg_b:expr),
fg_alt: ($fg_alt_r:expr, $fg_alt_g:expr, $fg_alt_b:expr),
base4: ($base4_r:expr, $base4_g:expr, $base4_b:expr),
red: ($red_r:expr, $red_g:expr, $red_b:expr),
orange: ($orange_r:expr, $orange_g:expr, $orange_b:expr),
yellow: ($yellow_r:expr, $yellow_g:expr, $yellow_b:expr),
green: ($green_r:expr, $green_g:expr, $green_b:expr),
cyan: ($cyan_r:expr, $cyan_g:expr, $cyan_b:expr),
blue: ($blue_r:expr, $blue_g:expr, $blue_b:expr),
magenta: ($magenta_r:expr, $magenta_g:expr, $magenta_b:expr),
violet: ($violet_r:expr, $violet_g:expr, $violet_b:expr)
) => { ... };
}Expand description
Macro to define a theme from a color palette.
Generates the pub fn theme() -> Theme function.
§Example
ⓘ
define_theme! {
bg: (0x28, 0x2a, 0x36),
bg_alt: (0x1E, 0x20, 0x29),
fg: (0xf8, 0xf8, 0xf2),
fg_alt: (0x62, 0x72, 0xa4),
base4: (0x56, 0x57, 0x61),
red: (0xff, 0x55, 0x55),
orange: (0xff, 0xb8, 0x6c),
yellow: (0xf1, 0xfa, 0x8c),
green: (0x50, 0xfa, 0x7b),
cyan: (0x8b, 0xe9, 0xfd),
blue: (0x61, 0xbf, 0xff),
magenta: (0xff, 0x79, 0xc6),
violet: (0xbd, 0x93, 0xf9)
}