pub enum Color {
    Alpha,
    Beta,
    Gamma,
    Delta,
    Zeta,
    Iota,
    Omega,
}
Expand description

Color in the color Palette

The variants are not named after any (actual) colors, since these come from the Palette and may be changed. Nonetheless, it is intended that the variants specify some meaning / intention about the actual colors they will be resolved to and, importantly, the role and visual impact they have in relation to the color scheme as a whole.

Currently these semantics are not very fleshed out, except to say that:

  • Alpha and Beta are used for the most common Tags, which makes them the most generally suitable
  • Gamma and Delta are used for warnings and errors respectively and should therefore only be used sparingly
  • Zeta and Iota are ill-defined, but perhaps they can be considered niche versions of Alpha and Beta
  • Omega is used for various decorations and is a color with low visual impact, specifically that it is less prominent (i.e. closer to the background color) than plain/normal text.

There are some implications for the amount of contrast between pairs of colors (perhaps Gamma and Delta should be fairly similar colors), but this needs to be refined.

Variants

Alpha

Used for the status tag, generally suitable

Beta

Used for the info tag, generally suitable

Gamma

Used for the warn tag, use sparingly

Delta

Used for the error tag, use sparingly

Zeta

Spare color

Iota

Spare color

Omega

Low intensity color

Implementations

Retrieves the ColorCode associated with this color from the static Palette

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 !=.

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

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.