The task is to create 1 pixel wide coloured vertical pinstripes with a sufficient number of pinstripes to span the entire width of the graphics display.



The pinstripes should either follow the system palette sequence,   or a sequence that includes:

black,   red,   green,   blue,   magenta,   cyan,   yellow,   and   white:

   after filling the top quarter, switch to a wider 2 pixel wide vertical pinstripe pattern,
   halfway down the display, switch to 3 pixel wide vertical pinstripe,
   finally to a 4 pixels wide vertical pinstripe for the last quarter of the display.


See also

   display black and white 
   print colour


w = 640 : h = 480
open window w, h
h4 = h/4
 
FOR I=1 TO 4
    COLIDX=0
    YTOP=(I-1)*h4
    FOR X=1 TO w STEP I
        IF mod(COLIDX, 8) = 0 RESTORE COLOURS
        READ R,G,B
        color R, G, B
        fill rectangle X,YTOP,X+I,YTOP+h4
        COLIDX = COLIDX + 1
    NEXT
NEXT
 
label COLOURS
DATA 0,0,0
DATA 255,0,0
DATA 0,255,0
DATA 0,0,255
DATA 255,0,255
DATA 0,255,255
DATA 255,255,0
DATA 255,255,255
 