color/
color.rs

1fn main() {
2    #[cfg(windows)]
3    if !ansi_builder::enable_ansi_color() {
4        println!("Failed to enable_ansi_color.");
5    }
6
7    AnsiBuilder::new()
8        .text("Hello, World! ")
9        .color().fg().red()
10        .text("Hello, World but in red!")
11        .println()
12        .color().fg().bright_blue()
13        .color().bg().red()
14        .text("Another sample text")
15        .reset_attributes()
16        .text(" Everything is reverted")
17        .println();
18}
19
20use ansi_builder::AnsiBuilder;