Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
Add Comment
Please, Sign In to add comment