windows_console_color_codes
windows_console_color_codes
0 Black Black
1 Blue Blue
2 Green Green
3 Aqua Aqua
4 Red Red
5 Purple Purple
6 Yellow Yellow
7 White White
8 Gray Gray
To use these colors in your program, call SetConsoleTextAttribute with the respective color codes.
on a black background.
You can set the background color by adding 16 to the color code.
For instance, code 10 will set green text, while code 10 + (16 * 0) will set green text on a black background.