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
fn fg<C: Into<ColorStyle>>(&self, color: C) -> StyledText
[src]
fn fg<C: Into<ColorStyle>>(&self, color: C) -> StyledText
[src]Converts the given value to a [ColoredText] with the foreground color style
fn bg<C: Into<ColorStyle>>(&self, color: C) -> StyledText
[src]
fn bg<C: Into<ColorStyle>>(&self, color: C) -> StyledText
[src]Converts the given value to a [ColoredText] with the background color style
fn fg_gray(&self, x: u8) -> StyledText
[src]
fn fg_gray(&self, x: u8) -> StyledText
[src]Converts the given value to a [ColoredText] with the foreground grayscale
fn bg_gray(&self, x: u8) -> StyledText
[src]
fn bg_gray(&self, x: u8) -> StyledText
[src]Converts the given value to a [ColoredText] with the background grayscale
fn fg_gradient<C: Into<RGB>>(&self, start: C, end: C) -> StyledText
[src]
fn fg_gradient<C: Into<RGB>>(&self, start: C, end: C) -> StyledText
[src]Converts the given value to a [ColoredText] with the foreground gradient
fn bg_gradient<C: Into<RGB>>(&self, start: C, end: C) -> StyledText
[src]
fn bg_gradient<C: Into<RGB>>(&self, start: C, end: C) -> StyledText
[src]Converts the given value to a [ColoredText] with the background gradient