I found it a bit difficult and annoying to change colors in discord.py (embed color for instance). I made a class for the different color codes to use in discord.py which can be imported into the main file.
class colors:
default = 0
teal = 0x1abc9c
dark_teal = 0x11806a
green = 0x2ecc71
dark_green = 0x1f8b4c
blue = 0x3498db
dark_blue = 0x206694
purple = 0x9b59b6
dark_purple = 0x71368a
magenta = 0xe91e63
dark_magenta = 0xad1457
gold = 0xf1c40f
dark_gold = 0xc27c0e
orange = 0xe67e22
dark_orange = 0xa84300
red = 0xe74c3c
dark_red = 0x992d22
lighter_grey = 0x95a5a6
dark_grey = 0x607d8b
light_grey = 0x979c9f
darker_grey = 0x546e7a
blurple = 0x7289da
greyple = 0x99aab5
It is possible to use e.g. colors.red
if red color is wanted. Is there any better way to do this?
Discord py is getting discontinued because Discord implemented more and more restrictions for Bot Developers, promised easy verification steps but is behind verification processes by months. Yet introducing more restrictions and now requiring even ID copies.
#FFFFFF means full FF amounts of Red, Green, and Blue. The result is WHITE. #FFEFD5 has high values for all colors, giving a light result: PAPAYAWHIP.
You could also use RGB codes by doing
embed=discord.Embed(COLOR=discord.Color.from_rgb(RGB code)
You already have the discord.Colour
class (or discord.Color
) for this:
from discord import Color
teal = Color.teal()
You can even change Color
to everything you want like so:
from discord import Color as c
teal = c.teal()
You can look at discord.py documentation for more informations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With