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


' version 14-03-2017
'    compile with: fbc -s console
' or compile with: fbc -s gui
 
Dim As UInteger ps, col, h, w, x, y1, y2
ScreenInfo w, h
 
' create display size window, 8bit color (palette), no frame
ScreenRes w, h, 8,, 8
 
h = h \ 4 : y2 = h -1
 
For ps = 1 To 4
    col = 0
    For x = 0 To (w - ps -1) Step ps
        Line (x, y1) - (x + ps -1, y2), col, bf
        col = (col +1) And 255
    Next
    y1 += h : y2 += h
Next
 
' empty keyboard buffer
While Inkey <> "" : Wend
'Print : Print "hit any key to end program"
Sleep
End