Created
December 10, 2018 22:00
-
-
Save CalvinLogan/acada38854c8da2e05673d8177be191c to your computer and use it in GitHub Desktop.
This file contains 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
from gui import * | |
from timer import * | |
import time | |
b = True | |
def updateColor(shape): | |
while b: | |
for count in range(0,3): | |
#From red (255,0,0) to blue (0,0,255) | |
for i in range(0,255): | |
red = 255 - i | |
green = 0 | |
blue = i | |
color = Color(red,green,blue) | |
shape.setColor(color) | |
time.sleep(0.01) | |
if color == Color(1,0,254): | |
#From blue (0,0,255) to red (255,0,0) | |
for i in range(0,255): | |
red = i | |
green = 0 | |
blue = 255 - i | |
color = Color(red,green,blue) | |
shape.setColor(color) | |
time.sleep(0.01) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment