How about actual rainbow colors?
parent
2f7c24a0ca
commit
c906c2eb66
|
@ -5,12 +5,19 @@ Copyright 2013, sfan5
|
||||||
"""
|
"""
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
rainbowcolors = ["4", "7", "8", "3", "12", "6", "13"]
|
||||||
|
#TODO: make this rainbow better (can't really make it that better because IRC colors suck)
|
||||||
|
|
||||||
def colorize(text):
|
def colorize(text):
|
||||||
out = ""
|
out = ""
|
||||||
|
i = 0
|
||||||
for c in text:
|
for c in text:
|
||||||
if c in list(str(i) for i in range(10)):
|
if c in list(str(i) for i in range(10)):
|
||||||
c = u"\u200b" + c # 'ZERO WIDTH SPACE' cuz IRC clients are stupid
|
c = u"\u200b" + c # 'ZERO WIDTH SPACE' cuz IRC clients are stupid
|
||||||
out += "\x03" + str(random.randint(2, 15)) + c
|
out += "\x03" + str(rainbowcolors[i]) + c
|
||||||
|
i += 1
|
||||||
|
if i >= len(rainbowcolors):
|
||||||
|
i = 0
|
||||||
return out
|
return out
|
||||||
|
|
||||||
def rainbow(phenny, input):
|
def rainbow(phenny, input):
|
||||||
|
|
Loading…
Reference in New Issue