Blasted forum bugs! Grrrr
Set display mode 640,480,16 : sync on : sync rate 40 : hide mouse : r = 2
g = 1 : b = 3 : ar = 1 : ag = 3 : ab = 4
repeat : oldr = r : oldg = g : oldb = b
oldar = ar : oldag = ag : oldab = ab
for x = 0 to 639 step 2 : ink rgb(r,g,b),0 : box x,0,x+1,479 : ink rgb(255-r,255-g,255-b),0
box 639-x,0,640-x,479 : gosub UpdateColor : next x
for y = 0 to 479 step 4 : ink rgb(r,g,b),0 : box 0,y,639,y+1 : ink rgb(255-r,255-g,255-b),0
box 0,478-y,639,479-y : gosub UpdateColor : next y
r = oldr : g = oldg : b = oldb : ar = oldar : ag = oldag
ab = oldab : gosub UpdateColor : sync : until scancode() <> 0
UpdateColor:
inc r, ar : inc g, ag : inc b, ab
if r > 255 or r < 0 : ar = -ar
if r > 255 : r = 255 - (r - 255) : else r = -r : endif : endif
if g > 255 or g < 0 : ag = -ag
if g > 255 : g = 255 - (g - 255) : else g = -g : endif : endif
if b > 255 or b < 0 : ab = -ab
if b > 255 : b = 255 - (b - 255) : else b = -b : endif : endif
return
...lets see if that works!
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.