fio icon indicating copy to clipboard operation
fio copied to clipboard

color console

Open bubnenkoff opened this issue 9 years ago • 2 comments

Is it's possible to add for print ability to change console color? It's very handy and take different dependence for such small future it's not handy

bubnenkoff avatar Jun 20 '16 07:06 bubnenkoff

I have a need for printing colored text as well. At this point, I'm not sure if it would be better as a separate library or not. I think it might be required to implement it as part of io simply because Windows does console text coloring strangely. Other D libraries for this (e.g., colorize, consoled, rainbow) only work with std.stdio as far as I can tell.

I'm thinking the API would look something like this:

print("Hello".color(blue), " world!".color(green));

jasonwhite avatar Jun 21 '16 06:06 jasonwhite

I really want to have it's as build-in future. It's very common task, and making it's as separate tool is not very handy. Even C# have build-in support of it.

Yeah this API is perfect! I like it.

bubnenkoff avatar Jun 21 '16 06:06 bubnenkoff