Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- gradient = ('D8D8D8','BDBDBD,'A4A4A4','848484','6E6E6E','585858','424242','2E2E2E')
- def gradientmadness(text):
- leng = len(text)
- output = ''
- if leng < 8:
- for i in range(0, leng):
- 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 / 5.0))
- for i in range(1, 6):
- output += text[(i-1)*size:i*size] + '</c>'
- return output
- gradientmadness.command="karkat"
- #usage regex replace ^(.*)$ -> karkat(\1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement