pub enum Color {
}
Expand description
Represents a color.
This type is a simplified re-implementation of crossterm’s Color enum. See crossterm::style::color
§Platform-specific Notes
The following list of 16 base colors are available for almost all terminals (Windows 7 and 8 included).
Light | Dark |
---|---|
DarkGrey | Black |
Red | DarkRed |
Green | DarkGreen |
Yellow | DarkYellow |
Blue | DarkBlue |
Magenta | DarkMagenta |
Cyan | DarkCyan |
White | Grey |
Most UNIX terminals and Windows 10 consoles support additional colors. See Color::Rgb or Color::AnsiValue for more info.
Usage:
Check crate::Cell::bg, crate::Cell::fg and on how to use it.
Variants§
Reset
Resets the terminal color.
Black
Black color.
DarkGrey
Dark grey color.
Red
Light red color.
DarkRed
Dark red color.
Green
Light green color.
DarkGreen
Dark green color.
Yellow
Light yellow color.
DarkYellow
Dark yellow color.
Blue
Light blue color.
DarkBlue
Dark blue color.
Magenta
Light magenta color.
DarkMagenta
Dark magenta color.
Cyan
Light cyan color.
DarkCyan
Dark cyan color.
White
White color.
Grey
Grey color.
Rgb
An RGB color. See RGB color model for more info.
Most UNIX terminals and Windows 10 supported only. See Platform-specific notes for more info.
AnsiValue(u8)
An ANSI color. See 256 colors - cheat sheet for more info.
Most UNIX terminals and Windows 10 supported only. See Platform-specific notes for more info.
Trait Implementations§
Source§impl Ord for Color
impl Ord for Color
Source§impl PartialOrd for Color
impl PartialOrd for Color
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)