Ripu Daman Singh Ripu Daman Singh - 1 month ago 19
C Question

How can i change the background color in c programming language?

I want to ask that how can I change the background color in c programs from black to any other color?

Answer

You can change the color by using here are some color codes

0 = Black   8 = Gray
1 = Blue    9 = Light Blue
2 = Green  
3 = Aqua   
4 = Red     
5 = Purple 
6 = Yellow  
7 = White 

system("color 7");

now this 7 is only for the background color if also want the foreground color changed too then simple use

system("color 76");

here 7 is for background and 6 is for the foreground

Comments