Last active
May 27, 2022 21:55
-
-
Save AlgorithmAlchemy/1134485a85e122d6123a136c06d51e18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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