[−][src]Trait simpleterm::text::TermColor
Adds brightness functions to PistonWindow's Color type
Required methods
fn brightness(&self) -> f32
Uses a weighted color axis to determine percieved brightness of a color.
assert_eq!(EMERALD.brightness(), 0.6626567);
fn brighter_than(&self, other: Color) -> bool
Returns true if this color is brighter than the given other color.
assert!(LIGHT_PURPLE.brighter_than(DARK_PURPLE));