pub struct Color { /* private fields */ }
Expand description
Implementations§
Source§impl Color
impl Color
Sourcepub const FG_BLACK: Self
pub const FG_BLACK: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BLUE: Self
pub const FG_BLUE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_BLACK: Self
pub const FG_BRIGHT_BLACK: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_BLUE: Self
pub const FG_BRIGHT_BLUE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_CYAN: Self
pub const FG_BRIGHT_CYAN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_GREEN: Self
pub const FG_BRIGHT_GREEN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_MAGENTA: Self
pub const FG_BRIGHT_MAGENTA: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_RED: Self
pub const FG_BRIGHT_RED: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_WHITE: Self
pub const FG_BRIGHT_WHITE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_BRIGHT_YELLOW: Self
pub const FG_BRIGHT_YELLOW: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_CYAN: Self
pub const FG_CYAN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_GREEN: Self
pub const FG_GREEN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_MAGENTA: Self
pub const FG_MAGENTA: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_RED: Self
pub const FG_RED: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_WHITE: Self
pub const FG_WHITE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const FG_YELLOW: Self
pub const FG_YELLOW: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BLACK: Self
pub const BG_BLACK: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BLUE: Self
pub const BG_BLUE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_BLACK: Self
pub const BG_BRIGHT_BLACK: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_BLUE: Self
pub const BG_BRIGHT_BLUE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_CYAN: Self
pub const BG_BRIGHT_CYAN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_GREEN: Self
pub const BG_BRIGHT_GREEN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_MAGENTA: Self
pub const BG_BRIGHT_MAGENTA: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_RED: Self
pub const BG_BRIGHT_RED: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_WHITE: Self
pub const BG_BRIGHT_WHITE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_BRIGHT_YELLOW: Self
pub const BG_BRIGHT_YELLOW: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_CYAN: Self
pub const BG_CYAN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_GREEN: Self
pub const BG_GREEN: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_MAGENTA: Self
pub const BG_MAGENTA: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_RED: Self
pub const BG_RED: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_WHITE: Self
pub const BG_WHITE: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Sourcepub const BG_YELLOW: Self
pub const BG_YELLOW: Self
A color representation.
Notice that the colors are constants so you can’t combine them.
Source§impl Color
impl Color
Sourcepub fn new<P, S>(prefix: P, suffix: S) -> Self
pub fn new<P, S>(prefix: P, suffix: S) -> Self
Creates a new Color
instance, with ANSI prefix and ANSI suffix. You can use [
TryFrom] to construct it from [
String`].
Sourcepub fn get_prefix(&self) -> &str
pub fn get_prefix(&self) -> &str
Return a prefix.
Sourcepub fn get_suffix(&self) -> &str
pub fn get_suffix(&self) -> &str
Return a suffix.
Sourcepub fn as_ansi_str(&self) -> Option<StaticColor<'static>>
pub fn as_ansi_str(&self) -> Option<StaticColor<'static>>
Tries to get a static value of the color.
Trait Implementations§
Source§impl<R> CellOption<R, ColoredConfig> for &Color
impl<R> CellOption<R, ColoredConfig> for &Color
Source§fn change(self, _: &mut R, cfg: &mut ColoredConfig, entity: Entity)
fn change(self, _: &mut R, cfg: &mut ColoredConfig, entity: Entity)
Entity
.Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
TableOption
is going to change table layout. Read moreSource§impl<R> CellOption<R, ColoredConfig> for Color
impl<R> CellOption<R, ColoredConfig> for Color
Source§fn change(self, _: &mut R, cfg: &mut ColoredConfig, entity: Entity)
fn change(self, _: &mut R, cfg: &mut ColoredConfig, entity: Entity)
Entity
.Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
TableOption
is going to change table layout. Read moreSource§impl From<ANSIStr<'static>> for Color
impl From<ANSIStr<'static>> for Color
Source§fn from(color: StaticColor<'static>) -> Self
fn from(color: StaticColor<'static>) -> Self
Source§impl Ord for Color
impl Ord for Color
Source§impl PartialOrd for Color
impl PartialOrd for Color
Source§impl<R, D> TableOption<R, ColoredConfig, D> for Color
impl<R, D> TableOption<R, ColoredConfig, D> for Color
Source§fn change(self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D)
fn change(self, _: &mut R, cfg: &mut ColoredConfig, _: &mut D)
Source§fn hint_change(&self) -> Option<Entity>
fn hint_change(&self) -> Option<Entity>
TableOption
is going to change table layout. Read more