Task

Display a series of vertical color bars across the width of the display.

The color bars should either use:

   the system palette,   or 
   the sequence of colors: 
   black
   red
   green
   blue
   magenta
   cyan
   yellow
   white


 
BEGIN {
  nrcolors = 8
 
  for (height=0; height<20; height++) {
    for (width=0; width<nrcolors; width++) {
      # print (ANSI) basic color and amount of spaces
      printf("\033[%dm%*s", width + 40, 64 / nrcolors, " ")
    }
 
    # reset color and print newline
    printf("\033[0m\n")
  }
}
 