Enum better_term::Color [−][src]
pub enum Color {
}
Expand description
Default ansi colors
Example
use better_term::Color;
// prints Hello, world! in green and red
println!("{}Hello, {}world!", Color::BrightGreen, Color::BrightRed);
Variants
Black
Red
Green
Yellow
Blue
Purple
Cyan
White
BrightBlack
BrightRed
BrightGreen
BrightYellow
BrightBlue
BrightPurple
BrightCyan
BrightWhite
Fixed(u8)
Tuple Fields
0: u8
RGB(u8, u8, u8)
Hex(u32)
Tuple Fields
0: u32
Default
Implementations
Convert color to a style with the foreground set to this color
Convert color to a style with the background set to this color
convert a hexadecimal value to an RGB color value (hex example: 0x000000 for black)
Convert to the ansi value within a string (for output with the ansi char)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Color
impl UnwindSafe for Color
Blanket Implementations
Mutably borrows from an owned value. Read more