output-coloring

Crates.iooutput-coloring
lib.rsoutput-coloring
version0.1.0
sourcesrc
created_at2023-05-22 00:38:44.625304
updated_at2023-05-22 00:38:44.625304
descriptionColoring terminal output, using template.
homepage
repositoryhttps://github.com/BHznJNs/output-coloring
max_upload_size
id870233
size41,160
BHznJNs (BHznJNs)

documentation

README

output-coloring

Coloring terminal output, using template.

Sample Code

extern crate output_coloring;

use output_coloring::*;

const TEST: ColoredTemplate = ColoredTemplate {
    ft_color: Color::White,
    bg_color: Some(Color::BrightWhite),
    style: Style::Bold,
};
const WARN_TEMPLATE: ColoredTemplate = ColoredTemplate {
    ft_color: Color::White,
    bg_color: Some(Color::Yellow),
    style: Style::Bold,
};

fn main() {
    println!("{}", TEST.output("Hello World!"));
    println!("{}", WARN_TEMPLATE.output(" WARNING! "));
}
Commit count: 4

cargo fmt