Function ncursesw::COLOR_PAIR[][src]

pub fn COLOR_PAIR(color_pair: ColorPair) -> attr_t
Expand description

Return the attribute value of a given normal color pair.

Example

extern crate ncursesw;

use ncursesw::*;
use ncursesw::normal::*;

start_color()?;

let yellow = Color::from_str("yellow")?;
let blue = Color::from_str("blue")?;
 
let color_pair0 = ColorPair::default();
let color_pair1 = ColorPair::new(1, Colors::new(yellow, blue))?;

assert!(COLOR_PAIR(color_pair0) == 0b0000000000);
assert!(COLOR_PAIR(color_pair1) == 0b0100000000);