Enum rustty::Color
[−]
[src]
pub enum Color { Black, Red, Green, Yellow, Blue, Magenta, Cyan, White, Byte(u8), Default, }
The color of a Cell
.
Color::Default
represents the default color of the underlying terminal.
The eight basic colors may be used directly and correspond to 0x00..0x07 in the 8-bit (256)
color range; in addition, the eight basic colors coupled with Attr::Bold
correspond to
0x08..0x0f in the 8-bit color range.
Color::Byte(..)
may be used to specify a color in the 8-bit range.
Examples
use rustty::Color; // The default color. let default = Color::Default; // A basic color. let red = Color::Red; // An 8-bit color. let fancy = Color::Byte(0x01); // Basic colors are also 8-bit colors (but not vice-versa). assert_eq!(red.as_byte(), fancy.as_byte())
Variants
Black
Red
Green
Yellow
Blue
Magenta
Cyan
White
Byte(u8)
Default
Methods
impl Color
[src]
Trait Implementations
impl Debug for Color
[src]
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Color) -> bool
This method tests for !=
.