Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset color to default #5

Closed
IngwiePhoenix opened this issue May 18, 2014 · 7 comments
Closed

Reset color to default #5

IngwiePhoenix opened this issue May 18, 2014 · 7 comments

Comments

@IngwiePhoenix
Copy link

Hey.

Is there a way to reset the current color? Like when I use setColor(2) and want to later return to what it was before i launched my application, how could I possibly do that?

Kind regards,
Ingwie.

@tapio
Copy link
Owner

tapio commented May 19, 2014

Currently not supported by the lib, but

  • If you are using ANSI escapes, you could try printing this escape code: "\033[39;49m".
  • On Windows, could check the current console color on app start with GetConsoleScreenBufferInfo and save that for later use.

@IngwiePhoenix
Copy link
Author

I am currently using [0m to reset properly. I thought rlutil was using ANSI escapes?

The windows function however should do it, cant test it on my Mac though :).

Would be great to see a function like this implemented in rlutil. I am trying to find a library to help me write an application that only really uses coloured console text - but this is so different on windows and UNIX...

"Yo Dawg, I heard you like C++, so I added C++ to your build system, so you have to compile before you compile.“ -StackOverflow, Matt Joiner ( http://stackoverflow.com/a/5025525/2423150 )

Am 19.05.2014 um 22:45 schrieb Tapio Vierros notifications@github.com:

Currently not supported by the lib, but

If you are using ANSI escapes, you could try printing this escape code: "\033[39;49m".
On Windows, could check the current console color on app start with GetConsoleScreenBufferInfo and save that for later use.

Reply to this email directly or view it on GitHub.

@Zorgatone
Copy link
Contributor

I believe we could add support for this?

@nabijaczleweli
Copy link
Contributor

I'm on it

@Zorgatone
Copy link
Contributor

👍 😄

@nabijaczleweli
Copy link
Contributor

Opened PR #15 with a patch implementing this

@IngwiePhoenix
Copy link
Author

IngwiePhoenix commented Nov 15, 2015 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants