1#include <iostream>
2#include <windows.h>
3int main()
4{
5 HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
6 for(int k = 1; k < 255; k++) //higher k = more colour
7 {
8 SetConsoleTextAttribute(hConsole, k);
9 std::cout << k << std::endl;
10 }
11}