Module color

Source
Expand description

Color managemement.

§Example

use termion::color;

fn main() {
    println!("{}Red", color::Fg(color::Red));
    println!("{}Blue", color::Fg(color::Blue));
    println!("{}Back again", color::Fg(color::Reset));
}

Structs§

AnsiValue
An arbitrary ANSI color value.
Bg
A background color.
Black
Black.
Blue
Blue.
Cyan
Cyan.
Fg
A foreground color.
Green
Green.
LightBlack
High-intensity light black.
LightBlue
High-intensity light blue.
LightCyan
High-intensity light cyan.
LightGreen
High-intensity light green.
LightMagenta
High-intensity light magenta.
LightRed
High-intensity light red.
LightWhite
High-intensity light white.
LightYellow
High-intensity light yellow.
Magenta
Magenta.
Red
Red.
Reset
Reset colors to defaults.
Rgb
A truecolor RGB.
White
White.
Yellow
Yellow.

Traits§

Color
A terminal color.
DetectColors
Types that allow detection of the colors they support.