where 0 is the background color and c is the text color.
Colors are as follows:
1 2 3 4 5 6 7 8
0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
Apparently using "system()" is discouraged. There are many discussions in these forums about it and here's a link for detailed reasons: http://www.cplusplus.com/articles/j3wTURfi/
Instead I use this function (Warning, it may seem a bit confusing/overwhelming at first but it really isn't that bad):
Just call this function whenever you need to change the color and pass a number as argument to the function. The name of the function is arbitrary. Ex. Color(7);
This is a copy of a program I made that I reference for colors. When you run it, it gives you the number in the color (both font and backround) that it stands for. Just use that number when calling the function.