#color #cli-color #cli #ansi #terminal #no-std

no-std concolor-clap

Clap mixin to control console colors

15 releases

0.1.0 Mar 8, 2023
0.0.13 Nov 24, 2022
0.0.10 Mar 23, 2022
0.0.7 Dec 31, 2021
0.0.6 Oct 6, 2021

#14 in #cli-color

Download history 424/week @ 2024-07-20 398/week @ 2024-07-27 426/week @ 2024-08-03 416/week @ 2024-08-10 310/week @ 2024-08-17 198/week @ 2024-08-24 275/week @ 2024-08-31 453/week @ 2024-09-07 248/week @ 2024-09-14 442/week @ 2024-09-21 348/week @ 2024-09-28 231/week @ 2024-10-05 1090/week @ 2024-10-12 1182/week @ 2024-10-19 434/week @ 2024-10-26 423/week @ 2024-11-02

3,201 downloads per month
Used in 10 crates

MIT/Apache

26KB
366 lines

concolor-clap

Convenience helper for working with clap

Documentation License Crates Status

Contribute

License

Dual-licensed under MIT or Apache 2.0


lib.rs:

Mixin a clap argument for colored output selection

Examples

// ...
#[derive(Debug, clap::Parser)]
#[clap(color = concolor_clap::color_choice())]
struct Cli {
    #[command(flatten)]
    color: concolor_clap::Color,
}

Features

  • auto (default): Automatically detect color support

Dependencies

~1.1–1.7MB
~33K SLoC