Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- RedBlueList = ('ff0000','ff0048','ff008b','ff00b9','ff00e6','eb00ff','be00ff','9100ff','6400ff','2000ff')
- def RedBlue(text):
- x = 10
- leng = len(text)
- output = ''
- if leng < x:
- for i in range(0, leng):
- output += '<c=#%s>' % RedBlueList[i]
- for i in range(0, leng):
- output += text[i] + '</c>'
- else:
- output += '<c=#'
- output += '><c=#'.join(RedBlueList)
- output += '>'
- size = int(math.ceil(leng / x+1))
- for i in range(1, x+1):
- output += text[(i-1)*size:i*size] + '</c>'
- return output
- RedBlue.command="RedToBlue"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement