Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gradient = ('55AB16', '50BF00', 'BCC200')
- def gradientmadness(text):
- leng = len(text)
- output = ''
- if leng < 3:
- for i in range(1, 3+1):
- output += '<c=#%s>' % gradient[i]
- for i in range(0, leng):
- output += text[i] + '</c>'
- else:
- output += '<c=#'
- output += '><c=#'.join(gradient)
- output += '>'
- size = int(math.ceil(leng / 3.0))
- for i in range(1, 3+1):
- output += text[(i-1)*size:i*size] + '</c>'
- return output
- gradientmadness.command="absinthe"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement