Display a gradient color using the function gradient(n). N can be any integer, a it is modulo. Do display a gradient, use the function in a loop and increment n progressively.
def gradiant(n): n,p,r,g,b=n%1530,n%1530%255,0,0,0 if n<255:r,b=255,p elif n<510:r,b=255-p,255 elif n<765:g,b=p,255 elif n<1020:g,b=255,255-p elif n<1275:r,g=p,255 elif n<1530:r,g=255,255-p return (r,g,b)