ThemeCliExt

Trait ThemeCliExt 

Source
pub trait ThemeCliExt {
    // Required methods
    fn cli_rgb(&self, token: &str) -> (u8, u8, u8);
    fn cli_colored(&self, text: &str, token: &str) -> ColoredString;
    fn cli_gradient(&self, text: &str, gradient_name: &str) -> String;
}
Expand description

Extension trait for easy access to theme colors for CLI output.

Required Methods§

Source

fn cli_rgb(&self, token: &str) -> (u8, u8, u8)

Get a token color as RGB tuple.

Source

fn cli_colored(&self, text: &str, token: &str) -> ColoredString

Apply a token color to a string.

Source

fn cli_gradient(&self, text: &str, gradient_name: &str) -> String

Apply a gradient to a string.

Implementors§