Codexportfolio intelligence

@philiprehberger/rs-clicolor

Cross-platform terminal color and style output with automatic capability detection

Rustcrates.io

Capabilities

README

rs-clicolor

CI Crates.io Last updated

Cross-platform terminal color and style output with automatic capability detection

Installation

[dependencies]
philiprehberger-clicolor = "0.2.0"

Usage

use philiprehberger_clicolor::Colorize;

println!("{}", "Error: something failed".red().bold());
println!("{}", "Warning: check this".yellow());
println!("{}", "Success!".green().on_black());

API

Function / TypeDescription
Colorize traitAdds .red(), .bold(), etc. to &str
StyleReusable style builder
ColorColor enum (16 colors + 256 + RGB)
gradient(text, from, to)Apply an RGB color gradient across characters
force_gradient(text, from, to)Same as gradient, ignoring color detection
strip_ansi(s)Remove ANSI escape codes from a string

Development

cargo test
cargo clippy -- -D warnings

Support

If you find this project useful:

Star the repo

🐛 Report issues

💡 Suggest features

❤️ Sponsor development

🌐 All Open Source Projects

💻 GitHub Profile

🔗 LinkedIn Profile

License

MIT