Crates.io | output-coloring |
lib.rs | output-coloring |
version | 0.1.0 |
source | src |
created_at | 2023-05-22 00:38:44.625304 |
updated_at | 2023-05-22 00:38:44.625304 |
description | Coloring terminal output, using template. |
homepage | |
repository | https://github.com/BHznJNs/output-coloring |
max_upload_size | |
id | 870233 |
size | 41,160 |
Coloring terminal output, using template.
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! "));
}