import turtle
t = turtle.Turtle()
ts = turtle.Screen()
t.speed(0)
ts.bgcolor("black")
r,g,b=255,0,0
for i in range(255*2):
#ts.colormode(255)
if i<255//3:
g+=3
elif i<255*2//3:
r-=3
elif i<255:
b+=3
elif i<255*4//3:
g-=3
elif i<255*5//3:
r+=3
else:
b-=3
t.fd(50+i)
t.rt(91)
t.pencolor(r,g,b)
t.done()