pub struct ColorPair {
pub front: Color,
pub back: Color,
}
Expand description
Combines a front and back color.
Fields§
§front: Color
Color used for the foreground.
back: Color
Color used for the background.
Implementations§
Source§impl ColorPair
impl ColorPair
Sourcepub const fn invert(self) -> ColorPair
pub const fn invert(self) -> ColorPair
Return an inverted color pair.
With swapped front and back color.
Sourcepub const fn terminal_default() -> ColorPair
pub const fn terminal_default() -> ColorPair
Return a color with TerminalDefault
as front and back.
Sourcepub const fn from_256colors(front: u8, back: u8) -> ColorPair
pub const fn from_256colors(front: u8, back: u8) -> ColorPair
Creates a new color pair from color IDs.
Trait Implementations§
Source§impl From<ColorPair> for ColorStyle
impl From<ColorPair> for ColorStyle
Source§fn from(color: ColorPair) -> ColorStyle
fn from(color: ColorPair) -> ColorStyle
Converts to this type from the input type.
Source§impl From<ColorPair> for ConcreteStyle
impl From<ColorPair> for ConcreteStyle
Source§fn from(color: ColorPair) -> ConcreteStyle
fn from(color: ColorPair) -> ConcreteStyle
Converts to this type from the input type.
Source§impl Resolvable for ColorPair
impl Resolvable for ColorPair
impl Copy for ColorPair
impl Eq for ColorPair
impl StructuralPartialEq for ColorPair
Auto Trait Implementations§
impl Freeze for ColorPair
impl RefUnwindSafe for ColorPair
impl Send for ColorPair
impl Sync for ColorPair
impl Unpin for ColorPair
impl UnwindSafe for ColorPair
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.