pub enum ColorPalette {
Show 18 variants TerminalDefault, Black, Red, Green, Yellow, Blue, Magenta, Cyan, White, LightBlack, LightRed, LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, LightWhite, Custom(i32),
}
Expand description

The color palette.

The first 8 color’s are considered dark colors, the next 8 (if available) are considered light colors.

Variants

TerminalDefault

Color #-1

Black

Black color

Color #0

Red

Red color

Color #1

Green

Green color

Color #2

Yellow

Yellow/Brown color (Red + Green)

Color #3

Blue

Blue color

Color #4

Magenta

Magenta color (Red + Blue)

Color #5

Cyan

Cyan color (Green + Blue)

Color #6

White

White color (Red + Green + Blue)

Color #7

LightBlack

Light black color

Color #8

LightRed

Light red color

Color #9

LightGreen

Light green color

Color #10

LightYellow

Light yellow color (LightRed + LightGreen)

Color #11

LightBlue

Light blue color

Color #12

LightMagenta

Light magenta color (LightRed + LightBlue)

Color #13

LightCyan

Light cyan color (LightGreen + LightBlue)

Color #14

LightWhite

Light white color (LightRed + LightGreen + LightBlue)

Color #15

Custom(i32)

Custom color

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

Returns the “default value” for a type. Read more

Parse a string to instance a color palette.

Valid values are: ‘default’, ‘black’, ‘red’, ‘green’, ‘yellow’, ‘blue’, ‘magenta’, ‘cyan’, ‘white’, ‘light black’, ‘light red’, ‘light green’, ‘light yellow’, ‘light blue’, ‘light magenta’, ‘light cyan’, ‘light white’

The associated error which can be returned from parsing.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

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.