Crates.io | kolorz |
lib.rs | kolorz |
version | 0.10.0 |
source | src |
created_at | 2023-06-27 02:43:54.496504 |
updated_at | 2024-02-11 20:16:41.319806 |
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 | 19,910 |
kolorz is a silly little library for printing kolored text to the terminal
Add kolorz to your project's Cargo.toml
:
[dependencies]
kolorz = "0.10.0"
// print kolored text
use kolorz::Kolor;
fn main() {
let mocha = Kolor::new("catppuccin mocha");
println!("{}", mocha.red("This is red"));
}
// custom kolorz from hex
use kolorz::HexKolorize;
fn main() {
println!("{}", "This is peach".kolorize("#fab387"));
}
// custom kolorz from RGB
use kolorz::RGBKolorize;
fn main() {
println!("{}", "This is red".kolorize((235, 160, 172)));
}
0.10.0 - Add numbered method to call kolorz a number