Changing the colour of text
Hi. I was just wondering how I could change the colour of output text in a program in C++. Not using ncurses winows of course. Thanks.
|
You can print the ANSI code for the color.
printf("\033[34;1mBright Blue\033[37;0m\n"); That will change the color to bright blue and then back to white. Here's a really good site that talks about all of the ANSI codes and lists which numbers are for which color, etc.: http://www.fh-jena.de/~gmueller/Kurs...esc_vt100.html |
All times are GMT -5. The time now is 01:22 AM. |