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
Fixed(u8)
Tuple Fields of Fixed
0: u8
Hex(u32)
Tuple Fields of Hex
0: u32
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