colored-rs / colored

(Rust) Coloring terminal so simple you already know how to do it !

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create and use our own custom colors

python128 opened this issue · comments

We should be able to make our own colors, and use them wherever we want.
Example:

use colored::*;

fn main() {
let greyish = make_color!(100, 100, 100); //In this, 'make_color!' macro is the syntax to make a new color, which we can use anywhere by:
println!("{}", "Hello".greyish()); // So that we don't have to keep typing 'truecolor(....)' and so on...
}

Felt it would be nice..

Hey, I saw your feature request and I opened a pull request, I hope it will be merged soon

PR #112 is what @mrquantumoff is talking about in the above comment, for the record 🙂

BTW, the PR was merged today!