pub enum Color {
Ansi(AnsiColor),
Ansi256(Ansi256Color),
Rgb(RgbColor),
}
Expand description
Any ANSI color code scheme
Variants§
Implementations§
Trait Implementations§
source§impl BitOr<Effects> for Color
impl BitOr<Effects> for Color
Define style with specified foreground color and effects
Examples
let fg = anstyle::Color::from((0, 0, 0));
let style = fg | anstyle::Effects::BOLD | anstyle::Effects::UNDERLINE;
source§impl From<Ansi256Color> for Color
impl From<Ansi256Color> for Color
source§fn from(inner: Ansi256Color) -> Self
fn from(inner: Ansi256Color) -> Self
Converts to this type from the input type.
source§impl From<Color> for Style
impl From<Color> for Style
Define style with specified foreground color
Examples
let style: anstyle::Style = anstyle::Color::from((0, 0, 0)).into();
source§impl Ord for Color
impl Ord for Color
source§impl PartialEq<Color> for Color
impl PartialEq<Color> for Color
source§impl PartialOrd<Color> for Color
impl PartialOrd<Color> for Color
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more