| Crates.io | tintify |
| lib.rs | tintify |
| version | 1.0.1 |
| created_at | 2025-04-15 11:09:51.398043+00 |
| updated_at | 2025-05-30 10:59:35.417018+00 |
| description | A lightweight library for terminal colors and styling |
| homepage | |
| repository | https://gitlab.com/celestifyx/colorlib |
| max_upload_size | |
| id | 1634293 |
| size | 144,114 |
A zero-allocation no_std-compatible zero-cost way to add color to your Rust terminal.
Supports:
NO_COLOR/FORCE_COLOR environment variablesset_overrideconsttintify is also more-or-less a drop-in replacement for colored, allowing colored to work in a no_std environment. No allocations or dependencies required because embedded systems deserve to be pretty too uwu.
To add to your Cargo.toml:
tintify = "1.0.0"
use tintify::TintColorize;
fn main() -> () {
// Foreground colors
println!("My number is {:#x}!", 10.green());
// Background colors
println!("My number is not {}!", 4.on_red());
}
use tintify::TintColorize;
use tintify::colors::*;
fn main() -> () {
// Generically color
println!("My number might be {}!", 4.fg::<Black>().bg::<Yellow>());
}
use tintify::TintColorize;
println!("{}", "strikethrough".strikethrough());
use tintify::TintColorize;
use tintify::Stream::Stdout;
println!("{}", "colored blue if a supported terminal".if_supports_color(Stdout, |text: &str| text.bright_blue()));
Supports NO_COLOR/FORCE_COLOR environment variables, checks if it's a tty,
checks if it's running in CI (and thus likely supports color), and checks which
terminal is being used. (Note: requires supports-colors feature)