Programing a rainbow of colors

So I recently looked at how you generated the colors of the rainbow, google turned up nothing useful. I eventually worked it out by looking at the colours of the rainbow and then looking at the "GIMP" colour picker and realizing it's a vertical rainbow (duh!).

The pattern is cute, giving a nice RGB staircase effect.

R  
RG
 G
 GB
  B
  BR
   R
   RG

The output obviously looks pretty too...

Rainbow of colors. Rainbow of colours. Rainbow of colors. Rainbow of colours. Rainbow of colors. Rainbow of colours.

Note that the 256 step version is pretty big :).


James Antill
Last modified: Mon Apr 25 13:28:52 EDT 2005