Skip to content

Instantly share code, notes, and snippets.

@AlgorithmAlchemy
Created May 27, 2022 21:50
Show Gist options
  • Save AlgorithmAlchemy/0050776cc86497ac0876e6d5eaff661b to your computer and use it in GitHub Desktop.
Save AlgorithmAlchemy/0050776cc86497ac0876e6d5eaff661b to your computer and use it in GitHub Desktop.
import turtle
from turtle import speed, bgcolor, colormode, fd, rt, pencolor
speed(15)
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)
pencolor(r, g, b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment