mercredi 10 décembre 2014

How to determine the current color of the console output?


I know that, if a coloured terminal is available, one can colour the output of it using escape characters.


But is there a possibility to find out, which colour the output is currently being displayed as? Or better, what colour the text would be, if I would output it right now?


I'm asking to not break any previous colour settings, when using these escape characters. The 'default foreground colour' escape character is getting it's information from the colour scheme, rather than the text colour before I changed it.



Aucun commentaire:

Enregistrer un commentaire