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

color() should support bright and custom colors with strings.

Ehllay opened this issue · comments

Right now, the color() function only supports regular colors, such as white red blue, etc, in a string format. But why doesn't this function support other types of colors?

For example if I want to use the bright blue color, I should be able to just use color("bright_blue"), but doing this simply does not format the text.

Same thing for custom colors, although it might be hard to handle RGB format in a string. Perhaps an hex format might be better for custom colors.

I'm aware that I can just use something like color(Color::BrightBlue) or color(Color::TrueColor {r: (), g: (), b: ()}), but, I'd rather have a more dynamic way to tell colored which colors to use.