Macro easycurses::colorpair
source · macro_rules! colorpair {
($fg: ident on $bg: ident) => { ... };
}
Expand description
A handy macro to make describing color pairs read more like normal english.
#[macro_use]
extern crate easycurses;
use easycurses::{Color, ColorPair};
use easycurses::Color::*;
fn main() {
for fg in Color::color_iterator() {
for bg in Color::color_iterator() {
assert_eq!(colorpair!(fg on bg), ColorPair::new(fg,bg));
}
}
}