Skip to content

Instantly share code, notes, and snippets.

@AlgorithmAlchemy
Last active May 27, 2022 21:55
Show Gist options
  • Save AlgorithmAlchemy/1134485a85e122d6123a136c06d51e18 to your computer and use it in GitHub Desktop.
Save AlgorithmAlchemy/1134485a85e122d6123a136c06d51e18 to your computer and use it in GitHub Desktop.
import turtle
from turtle import speed, bgcolor, colormode, fd, rt, pencolor
speed(50)
bgcolor('black')
r, g, b = 255, 0, 0
for i in range(255 * 2):
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
fd(55 + i)
rt(155)
turtle.back(10)
turtle.clone()
turtle.left(45)
pencolor(r, g, b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment