4 Commits

Author SHA1 Message Date
Daishiky
4291d4cf31 Update discord/colour.py
Co-authored-by: proguy914629 <74696067+proguy914629bot@users.noreply.github.com>
2021-09-20 19:06:53 +02:00
Daishiky
28caab0974 Update discord/colour.py
Co-authored-by: proguy914629 <74696067+proguy914629bot@users.noreply.github.com>
2021-09-20 19:06:47 +02:00
Daishiky
f9e0e2b55a Update colour.py 2021-09-19 18:54:10 +02:00
Daishiky
d2aae4752a added embed_background color 2021-09-19 18:51:02 +02:00

View File

@@ -5562,5 +5562,23 @@ class Colour:
def crayon_piggy_pink(cls):
"""A factory method that returns a :class:`Colour` with a value of ``0xFDDDE6``."""
return cls(0xFDDDE6)
@classmethod
def embed_background(cls, theme: str = "dark"):
"""A factory method that returns a :class:`Color` with a value of
``0x2F3136`` (dark)
``0xf2f3f5`` (light).
.. versionadded:: 2.0
"""
themes_cls = {
"dark": 0x2F3136,
"light": 0xf2f3f5
}
if theme not in themes_cls:
raise TypeError("Theme must be one of \"dark\" or \"light\".")
return cls(themes_cls[theme])
Color = Colour
Color = Colour