pub enum Color {
Show 21 variants Default, LightWhite, LightBlack, LightBlue, LightCyan, LightGreen, LightMagenta, LightRed, LightYellow, LightGrey, DarkWhite, DarkBlack, DarkBlue, DarkCyan, DarkGreen, DarkMagenta, DarkRed, DarkYellow, DarkGrey, Index(u8), Rgb { red: u8, green: u8, blue: u8, },
}
Expand description

Represents a color.

Variants

Default

The default teminal color.

LightWhite

The standard white color.

LightBlack

The standard black color.

LightBlue

The standard blue color.

LightCyan

The standard cyan color.

LightGreen

The standard green color.

LightMagenta

The standard magenta color.

LightRed

The standard red color.

LightYellow

The standard yellow color.

LightGrey

The standard grey color.

DarkWhite

The dimmed white color.

DarkBlack

The dimmed black color.

DarkBlue

The dimmed blue color.

DarkCyan

The dimmed cyan color.

DarkGreen

The dimmed green color.

DarkMagenta

The dimmed magenta color.

DarkRed

The dimmed red color.

DarkYellow

The dimmed yellow color.

DarkGrey

The dimmed grey color.

Index(u8)

An ANSI indexed color.

Rgb

Fields

red: u8

The red amount of the triple.

green: u8

The green amount of the triple.

blue: u8

The blue amount of the triple.

A RGB color triple.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.