This crate provides OwoColorize
, an extension trait for colorizing a
formatter.
Example
use OwoColorize;
Generically color
use OwoColorize;
use *;
Stylize
use OwoColorize;
println!;
This crate provides OwoColorize
, an extension trait for colorizing a
formatter.
use owo_colors::OwoColorize;
fn main() {
// Foreground colors
println!("My number is {:#x}!", 10.green());
// Background colors
println!("My number is not {}!", 4.on_red());
}
use owo_colors::OwoColorize;
use owo_colors::colors::*;
fn main() {
// Generically color
println!("My number might be {}!", 4.fg::<Black>().bg::<Yellow>());
}
use owo_colors::OwoColorize;
println!("{}", "strikethrough".strikethrough());