Advertisement
LuaDotExe

PurpleToBlack

Mar 12th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. import math
  2.  
  3. #Purple to Black
  4. PurpToBlack = ('000000','230024','360038','47004A','600063','79007D','910096','A500AB','B900BF','D400DB')
  5.  
  6. def gradientpurpleblack(text):
  7.     leng = len(text)
  8.     output = ''
  9.     if leng < 1:
  10.         for i in range(0, leng):
  11.             output += '<c=#%s>' % PurpToBlack[i]
  12.         for i in range(0, leng):
  13.             output += text[i] + '</c>'
  14.     else:
  15.         output += '<c=#'
  16.         output += '><c=#'.join(PurpToBlack)
  17.         output += '>'
  18.         size = int(math.ceil(leng / 11.0))
  19.         for i in range(1, 12):
  20.             output += text[(i-1)*size:i*size] + '</c>'
  21.     return output
  22. gradientpurpleblack.command="PurpToBlack"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement