Advertisement
bueddl

Untitled

May 22nd, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1.  
  2. #include <cstdlib>
  3. #include <iostream>
  4. #include <sstream>
  5.  
  6. using namespace std;
  7.  
  8. /*
  9.  *
  10.  */
  11. int main() {
  12.     ostringstream ss;
  13.    
  14.     ss.str("\E[0m");
  15.     string default_console = ss.str();
  16.    
  17.     for (int i = 0; i < 16; i++)
  18.     {
  19.         for (int j = 0; j < 16; j++)
  20.         {
  21.             int col = i+j*16;
  22.             ss.str("");
  23.             ss << "\E[0;37m\E[38;05;" << col << "m";
  24.  
  25.             string color = ss.str();
  26.             cout << default_console << color << col << "\t";
  27.         }
  28.         cout << endl;
  29.     }
  30.     std::cout << "Done" << std::endl;
  31.  
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement