aboutsummaryrefslogtreecommitdiff
path: root/vendor/console/examples/colors.rs
blob: 69c51fd18325caf4d68abacd8cb75e5c4d2fa905 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use console::style;

fn main() {
    println!(
        "This is red on black: {:010x}",
        style(42).red().on_black().bold()
    );
    println!("This is reversed: [{}]", style("whatever").reverse());
    println!("This is cyan: {}", style("whatever").cyan());
    eprintln!(
        "This is black bright: {}",
        style("whatever").for_stderr().bright().black()
    );
}