cmd color text c++
#include <iostream>
#include <windows.h>
int main()
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
for(int k = 1; k < 255; k++) //higher k = more colour
{
SetConsoleTextAttribute(hConsole, k);
std::cout << k << std::endl;
}
}