Struct cursive::theme::ColorStyle[][src]

pub struct ColorStyle {
    pub front: ColorType,
    pub back: ColorType,
}
Expand description

Possible color style for a cell.

Represents a color pair role to use when printing something.

The current theme will assign each role a foreground and background color.

The Default value is to inherit the parent’s colors.

Fields

front: ColorType

Color used for the foreground (the text itself).

back: ColorType

Color used for the background.

Implementations

Creates

Uses the given color as front, inherits the parent background color.

Uses the given color as background, inherits the parent front color.

Uses ColorType::InheritParent for both front and background.

Style set by terminal before entering a Cursive program.

Application background, where no view is present.

Color used by view shadows. Only background matters.

Main text with default background.

Secondary text color, with default background.

Tertiary text color, with default background.

Title text color with default background.

Alternative color for a title.

Alternate text with highlight background.

Highlight color for inactive views (not in focus).

Merge the style b over style a.

This merges the front and back color types of a and b.

Return the color pair that this style represents.

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.