"""
For this file to work properly, you should please read all the comments.
Comments are enclosed in " " " marks (without spaces), like this one.
Place this file in the Pesterchum quirks folder, which is usually
C:\Pesterchum\quirks for Windows.
Remember to set the file type as "All" and the extension to .py
Please read thoroughly.
If you have any questions, ask someone who knows about gradients.
"""
from math import ceil
gradient = ('COLOR 1', 'COLOR 2')
colors = len(gradient)
"""
Put the colors you want up there, in CORRECT order. They must be in RRGGBB HEXADECIMAL format.
If you don't know what that is, look it up on Google and have your color values converted there.
Remember to enclose each color value in single quotes and separate the color values with commas.
"""
def gradientmadness(text):
leng = len(text)
output = ''
if leng < colors:
for i in range(0, leng):
output += '<c=#%s>' % gradient[colors - 1 - i]
for i in range(0, leng):
output += text[i] + '</c>'
else:
for i in range(0, colors):
output += '<c=#' + gradient[colors - 1 - i] + '>'
size = int(ceil(leng / float(colors)))
for i in range(1, colors + 1):
output += text[(i-1)*size:i*size] + '</c>'
return output
"""
Don't do anything to this part of the code unless you know what you're doing.
You'll break the gradient function.
"""
gradientmadness.command="gradientname"
"""
Between the double quotes above, insert the name of your gradience function
To use in the quirks menu:
regex replace ^(.*)$
and replace it with
gradientname(\1)
where gradientname is the name entered in the double quotes.
Remember to click the RELOAD FUNCTIONS button
so that it will appear in the functions list
and to test if you did it right.
There will be no error messages if you edited this file correctly.
Don't forget to click FINISH then OK when you're done.
If you want to test it, use the QUIRK TEST button so
you don't flood memos or chats.
"""