Lyricdev
GitHub

enum Color

pub enum Color :: [Equatable, Debug]

Conforms to Equatable, Debug.

A terminal color: one of the 16 of ECMA-48 and aixterm, one of the 256, or RGB.

Out-of-range components of Color.Index and Color.Rgb are clamped to 0..255.

Variants

Black
Red
Green
Yellow
Blue
Magenta
Cyan
White
BrightBlack
BrightRed
BrightGreen
BrightYellow
BrightBlue
BrightMagenta
BrightCyan
BrightWhite
Index(int)

One of the 256 colors, by index (0..255).

Rgb(int, int, int)

A color by its red, green and blue components (each 0..255).