pub enum Color {
Reset,
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White,
Rgb(u8, u8, u8),
Indexed(u8),
}Expand description
Terminal color.
Covers the standard 16 named colors, 256-color palette indices, and
24-bit RGB true color. Use Color::Reset to restore the terminal’s
default foreground or background.
Variants§
Reset
Reset to the terminal’s default color.
Black
Standard black (color index 0).
Red
Standard red (color index 1).
Green
Standard green (color index 2).
Yellow
Standard yellow (color index 3).
Blue
Standard blue (color index 4).
Magenta
Standard magenta (color index 5).
Cyan
Standard cyan (color index 6).
White
Standard white (color index 7).
Rgb(u8, u8, u8)
24-bit true color.
Indexed(u8)
256-color palette index.
Trait Implementations§
impl Copy for Color
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