pub enum Color {
Black,
White,
Grey,
DarkGrey,
LightGrey,
Red,
Green,
Blue,
Cyan,
Yellow,
Magenta,
Xterm(u8),
}Expand description
A set of common colors and a Color::Xterm value that allows you to pass an arbitrary ANSI
8-bit color using its Xterm number (compatible with Windows 10 and most UNIX terminals).
§Example
For instance, to set a Pencil’s foreground color to Xterm color
DarkCyan (#00af87), you would do something similar to the following:
let mut pencil = Pencil::new(window.canvas_mut());
pencil.set_foreground(Color::Xterm(36));For reference, see the 256 Colors Cheat Sheet.
Variants§
Implementations§
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 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