Advertisement
LuaDotExe

Red-Blue-Purple Gradient

Jul 8th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. import math
  2. RedBluePurpleList = ('B300B3','9E00B3','8600B3','6E00B3','4800B3','2400B3','4800B3','6E00B3','8600B3','9E00B3','B300B3','B300A7','B30086','B3006E','B3004A','B3002A','B30012','B30000','CC0000','E80000','FF0000')
  3. def RedBluePurple(text):
  4.     x = 18
  5.     leng = len(text)
  6.     output = ''
  7.     if leng < 18:
  8.         for i in range(0, leng):
  9.             output += '<c=#%s>' % RedBluePurpleList[i]
  10.         for i in range(0, leng):
  11.             output += text[i] + '</c>'
  12.     else:
  13.         output += '<c=#'
  14.         output += '><c=#'.join(RedBluePurpleList)
  15.         output += '>'
  16.         size = int(math.ceil(leng / 18.0))
  17.         for i in range(1, 19):
  18.             output += text[(i-1)*size:i*size] + '</c>'
  19.     return output
  20. RedBluePurple.command="RedBluePurple"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement