Trait coloriz::Colorize[][src]

pub trait Colorize: Into<StyledText> {
    fn fg<C: Into<ColorStyle>>(&self, color: C) -> StyledText;
fn bg<C: Into<ColorStyle>>(&self, color: C) -> StyledText;
fn fg_gray(&self, x: u8) -> StyledText;
fn bg_gray(&self, x: u8) -> StyledText;
fn fg_gradient<C: Into<RGB>>(&self, start: C, end: C) -> StyledText;
fn bg_gradient<C: Into<RGB>>(&self, start: C, end: C) -> StyledText; }
Expand description

The trait that can be colored

Required methods

Converts the given value to a [ColoredText] with the foreground color style

Converts the given value to a [ColoredText] with the background color style

Converts the given value to a [ColoredText] with the foreground grayscale

Converts the given value to a [ColoredText] with the background grayscale

Converts the given value to a [ColoredText] with the foreground gradient

Converts the given value to a [ColoredText] with the background gradient

Implementations on Foreign Types

Implementors