Created
May 25, 2014 12:40
-
-
Save jaseg/61d98f55330d48706e71 to your computer and use it in GitHub Desktop.
Rainbow terminal cursors
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
#!/usr/bin/env python | |
from colorsys import hsv_to_rgb | |
from time import sleep | |
from itertools import cycle | |
for i in cycle(range(100)): | |
print('\033]12;#{:02x}{:02x}{:02x}\007'.format(*map(lambda x: int(x*255), hsv_to_rgb(i/100, 1, 1))), end='', flush=True) | |
sleep(0.05) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment