| Crates.io | kolorz |
| lib.rs | kolorz |
| version | 1.1.0 |
| created_at | 2023-06-27 02:43:54.496504+00 |
| updated_at | 2026-01-17 05:26:00.189981+00 |
| description | A silly little library for printing kolored text to the terminal |
| homepage | |
| repository | https://github.com/dotzenith/kolorz.rs |
| max_upload_size | |
| id | 900923 |
| size | 32,008 |
kolorz is a silly little library for printing kolored text to the terminal
It supports a number of kolorschemes, and it respects CLICOLOR and friends
Add kolorz to your project's Cargo.toml:
[dependencies]
kolorz = "1.0.0"
// print kolored text
use kolorz::Kolor;
fn main() {
let mocha = Kolor::new("catppuccin mocha").expect("Invalid kolorscheme");
println!("{}", mocha.red("This is red"));
}
// If the hex code is invalid, the text will not be colored
use kolorz::HexKolorize;
fn main() {
println!("{}", "This is peach".kolorize("#fab387"));
}
use kolorz::RGBKolorize;
fn main() {
println!("{}", "This is red".kolorize((235, 160, 172)));
}
1.1.0 - Remove Result for HexKolorize