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
graphsize w, h
 
dim k = {black, red, green, blue, purple, cyan, yellow, white}
h /= 4
 
for i = 1 to 4
    col = 0
    y = (i-1) * h
    for x = 1 to w step i
        if col mod 8 = 0 then col = 0
        colour k[col]
        rect (x, y, x + i, y + h)
        col += 1
    next x
next i