I am making a simple application which requires colored output. How can I make my output colored like emacs and bash do?
I don’t care about Windows, as my application is only for UNIX systems.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All modern terminal emulators use ANSI escape codes to show colours and other things.
Don’t bother with libraries, the code is really simple.
More info is here.
Example in C: