Guides 11791 Published by

Linuxers shows you how to change the terminal colors from command line or console



So, I have been working on this console based project. I wanted to make certain messages - warning etc. to be highlighted so that it could catch the user's eye easily. Since, the code was in C, I looked for printing colour using printf and came to know about this old school way of changing a terminal colours through commands.

Earlier using escape sequences (because they start with an escape character) people used to manage remote terminals. You can try this out in your own terminal. All we have to do is echo the escape sequence.
  How to change the terminal colors from command line or console