Follow edited Feb 14 13 at 1225.
How to change text color in c++ console. Just add include to yourinclude_directories and you should be. IntelliSense will show you the. If You want to change the Text color in C language There are many ways.
For color code and example programs please visit. We change colors to make programs more expressive. System color 02 change color to green.
Colors are bit-encoded. In order to make the text color red number 31 you can write 033 31m which will make any following output red. Line 5 changes the foreground colour to a light blue so that the input is in a different colour.
First the Console has many static methods and properties on it. This is for console application. 139k 15 15 gold badges 89 89 silver badges 135 135 bronze badges.
Every time i googled it i found shitty ways to do it using system commands an such so i figured i would upload this to help someone who wanted to do it mor. How To Change Text Color of CC Console Application in CodeBlocks - YouTube. Code for setting text colors back to WHITE so the output will be like for example.
The task is to change this color to some other color. Just change it to the desired color before printing the character then change it back after printing the character. 7 White f Bright White you put two characters first one is background color second is text color.