*
* set  99 colours  in Grads
* you will not see any of this other then in gray,
* if you can't convince your computer of accepting GAVIDEO=vga256 (at least).
* see the readme file about this.
*
kob=1
while (kob <= 8 )
* inner loop put in a function
  incol(kob)
  kob=kob+1
endwhile
'set rgb 16 255 255 0  '
'set rgb 17 255 0   0  '
'set rgb 18 0   0   255'
'set rgb 19 0   255 0  '
'set rgb 20 0   255 255'

* black to light grey
'set rgb 41 225 225 225'
'set rgb 42 180 180 180'
'set rgb 43 160 160 160'
'set rgb 44 140 150 150'
'set rgb 45 140 140 140'
'set rgb 46 112 112 112'
'set rgb 47  80  80  80'
'set rgb 48  60  60  60'
'set rgb 49  40  40  40'
'set rgb 50  32  32  32'

* TMO colours
'set rgb 76   0 102 153'
'set rgb 77 153 204 204'
'set rgb 78 255 255 153'
'set rgb 79 255 153   0'
'set rgb 80 204   0  51'

* display loop
k=0
i=1
while ( i <= 10)
* comment next line out for no display, set color only.
* inner loop put in a function
* indisp(i)
  i = i + 1
endwhile
*jaecol()
*indisp2()

function indisp2()
i=1
while (i <= 10)
j=1
  while ( j <=  10)
     k=(i-1)*10+j
    'set line 'k
     b=(i*0.8)-0.5
     a=(j*0.8)-0.5
     c=a+0.6
     d=b+0.6
    'draw recf 'a' 'b' 'c' 'd
    j = j + 1
  endwhile
    i = i + 1
  endwhile
return
function incol (kob)
* play with the rgb values for each row of ten. Have fun!
job=1
  while (job <= 10 )
        n=(kob-1)*10+job+20
        m=(kob-1)*10+job
        if( kob = 1 )
          r=32
          g=30*job
          b=225
        endif
        if( kob = 2 )
          r=200
          g=32*job
          b=200
        endif
        if( kob = 3 )
          r=32*job
          g=150
          b=150
        endif
        if( kob = 4 )
          r=132
          g=225
          b=30*job
        endif
        if( kob = 5 )
          r=255
          g=32*job
          b=0
        endif
        if( kob = 6 )
          r=255
          g=255
          b=30*job
        endif
        if( kob = 7 )
          r=32
          g=255
          b=32*job
        endif
        if( kob = 8 )
          r=30*job
          g=220
          b=255
        endif
        if(r <   0 ) ; r=  0;endif;
        if(g <   0 ) ; g=  0;endif;
        if(b <   0 ) ; b=  0;endif;
        if(r > 255 ) ; r=255;endif;
        if(g > 255 ) ; g=255;endif;
        if(b > 255 ) ; b=255;endif;
        if(n = 100 ) ; break ;endif;
        'set rgb 'n' 'r' 'g' 'b
*        say n' 'r' 'g' 'b
        job=job+1
  endwhile
return

function indisp (i)
j=1
  while ( j <=  10)
     k=(i-1)*10+j
    'set line 'k
     b=(i*0.8)-0.5
     a=(j*0.8)-0.5
     c=a+0.6
     d=b+0.6
    'draw recf 'a' 'b' 'c' 'd
    j = j + 1
  endwhile
return
function jaecol()

*light yellow to dark red
'set rgb 21 255 250 170'
'set rgb 22 255 232 120'
'set rgb 23 255 192  60'
'set rgb 24 255 160   0'
'set rgb 25 255  96   0'
'set rgb 26 255  50   0'
'set rgb 27 225  20   0'
'set rgb 28 192   0   0'
'set rgb 29 165   0   0'
*
*light green to dark green
'set rgb 31 230 255 225'
'set rgb 32 200 255 190'
'set rgb 33 180 250 170'
'set rgb 34 150 245 140'
'set rgb 35 120 245 115'
'set rgb 36  80 240  80'
'set rgb 37  55 210  60'
'set rgb 38  30 180  30'
'set rgb 39  15 160  15'
*set rgb 39   5 150   5
*
*light blue to dark blue
'set rgb 41 200 255 255'
'set rgb 42 175 240 255'
'set rgb 43 130 210 255'
'set rgb 44  95 190 250'
'set rgb 45  75 180 240'
'set rgb 46  60 170 230'
'set rgb 47  40 150 210'
'set rgb 48  30 140 200'
'set rgb 49  20 130 190'
*
*light purple to dark purple
'set rgb 51 220 220 255'
'set rgb 52 192 180 255'
'set rgb 53 160 140 255'
'set rgb 54 128 112 235'
'set rgb 55 112  96 220'
'set rgb 56  72  60 200'
'set rgb 57  60  40 180'
'set rgb 58  45  30 165'
'set rgb 59  40   0 160'
*
*light pink to dark rose
'set rgb 61 255 230 230'
'set rgb 62 255 200 200'
'set rgb 63 248 160 160'
'set rgb 64 230 140 140'
'set rgb 65 230 112 112'
'set rgb 66 230  80  80'
'set rgb 67 200  60  60'
'set rgb 68 180  40  40'
'set rgb 69 164  32  32'
*
* black to light grey
'set rgb 71 250 250 250'
'set rgb 41 225 225 225'
'set rgb 73 200 200 200'
'set rgb 42 180 180 180'
'set rgb 43 160 160 160'
'set rgb 44 140 150 150'
'set rgb 45 140 140 140'
'set rgb 78 124 124 124'
'set rgb 46 112 112 112'
'set rgb 80  92  92  92'
'set rgb 47  80  80  80'
'set rgb 82  70  70  70'
'set rgb 48  60  60  60'
'set rgb 84  50  50  50'
'set rgb 49  40  40  40'
'set rgb 86  36  36  36'
'set rgb 87  32  32  32'

return
