colored-rs / colored

(Rust) Coloring terminal so simple you already know how to do it !
Mozilla Public License 2.0
1.73k stars 83 forks source link

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

Open Ehllay opened 8 months ago

Ehllay commented 8 months ago

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.