#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

#15 in #cli-color

Download history 157/week @ 2023-12-10 410/week @ 2023-12-17 37/week @ 2023-12-24 179/week @ 2023-12-31 888/week @ 2024-01-07 148/week @ 2024-01-14 205/week @ 2024-01-21 171/week @ 2024-01-28 189/week @ 2024-02-04 226/week @ 2024-02-11 471/week @ 2024-02-18 338/week @ 2024-02-25 180/week @ 2024-03-03 157/week @ 2024-03-10 284/week @ 2024-03-17 647/week @ 2024-03-24

1,292 downloads per month
Used in 11 crates (10 directly)

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.2–1.8MB
~35K SLoC