Created
February 8, 2015 10:17
-
-
Save blakerohde/83da7f2aa3463cc85c6e to your computer and use it in GitHub Desktop.
Drawing Rainbows!
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
# Color hack for fun | |
rainbow = ( | |
'cyan', | |
'blue', | |
'magenta', | |
'pink', | |
'red', | |
'orange', | |
'yellow', | |
'green', | |
) | |
rainbow_i = 0 | |
rainbow_i_delta = -1 | |
# Set the color... | |
color = rainbow[rainbow_i] | |
# After setting the color... | |
rainbow_i_delta = (-1*rainbow_i_delta) if rainbow_i==(len(rainbow)-1) or rainbow_i==0 else rainbow_i_delta | |
rainbow_i = rainbow_i+rainbow_i_delta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment