Skip to content

Instantly share code, notes, and snippets.

@CalvinLogan
Created December 10, 2018 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CalvinLogan/acada38854c8da2e05673d8177be191c to your computer and use it in GitHub Desktop.
Save CalvinLogan/acada38854c8da2e05673d8177be191c to your computer and use it in GitHub Desktop.
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