blob: ed0224f48b147e5c8b7fea4ea00911279419cde4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
extern crate yansi_term;
use yansi_term::{Colour::*, Style};
// This example prints out the 16 basic colours.
fn main() {
println!(
"{}",
Red.paint_fn(|f| {
f.write_str("RED")?;
Style::new().bold().write_prefix(f)?;
f.write_str("RED_BOLD")?;
Style::write_reset(f)?;
Black.write_prefix(f)?;
f.write_str("BLACK")
})
);
}
|