concolor

Crates.ioconcolor
lib.rsconcolor
version0.1.1
sourcesrc
created_at2022-01-11 21:19:59.2987
updated_at2023-03-13 22:14:23.365543
descriptionControl console coloring across all dependencies
homepage
repositoryhttps://github.com/rust-cli/concolor
max_upload_size
id512464
size30,697
Maintainers (github:rust-cli:maintainers)

documentation

README

concolor

bin/lib API for managing terminal styling

Documentation License Crates Status

Features

  • Detects interactive stdout / stderr
  • Detects terminal capabilities via TERM
  • Detects and enables ANSI support on Windows
  • Supports CLICOLOR and NO_COLOR

Contribute

Special note: to be successful, this crate cannot break compatibility or else different crates in the hierarchy will be reading different globals. While end users can work around this, it isn't ideal. Once we hit 1.0, we should strive to keep the API compatible. If we need a new API, we can make the old API an adapter to the new logic.

Similarly, we should strive to reduce risk of breaking compatibility by exposing as little as possible. Anything more should be broken out into a separate crate that this crate can call into.

Special Thanks

Prior art for global colors control:

termcolor for identifying various corner cases with environment detection.

firestorm for zero-cost abstraction via bin/lib-specific Cargo.toml features.

License

Dual-licensed under MIT or Apache 2.0

Commit count: 183

cargo fmt