Colors are
BLACK = 0
DARK BLUE = 1
DARK GREEN = 2
TURQUOISE = 3
DARK RED = 4
PURPLE = 5
GOLD = 6
LIGHT GRAY(ORIGIN) = 7
GRAY = 8
BLUE = 9
GREEN = 10
SKY BLUE = 11
RED = 12
PLUM = 13
YELLOW = 14
WHITE = 15
Color set = foreground(text) color + background color * 16
ex) red color + white background = 12 + 15 * 16 = 252
#include <windows.h>
int main(int argc, char** argv)
{
HANDLE h_console;
h_console = GetStdHandle(STD_OUTPUT_HANDLE);
for(int color_iter=0; color_iter < 255; color_iter++){
SetConsoleTextAttribute(h_console, color_iter);
std::cout << color_iter << ": color!! << std::endl;
}
return 0;
}