pub enum Color {
Rgb {
r: u8,
g: u8,
b: u8,
},
Rgba {
r: u8,
g: u8,
b: u8,
a: u8,
},
}Expand description
The internal representation of a hexadecimal RGB/RGBA color
This internal representation serves as an intermediate representation of “color”. It can be
converted to and from crossterm::style::Color::Rgb, although it is lossy because crossterm
does not have an Rgba analogue
Variants§
Rgb
A standard hexadecimal color representation parameterized as red, green, and blue
Rgba
A hexadecimal color representation parameterized as red, green, blue, and alpha for transparency
Trait Implementations§
impl Copy for Color
Source§impl<'de> Deserialize<'de> for Color
impl<'de> Deserialize<'de> for Color
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
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