mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Add colours for new Discord themes
This commit is contained in:
@ -21,6 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import colorsys
|
||||
@ -457,20 +458,59 @@ class Colour:
|
||||
"""
|
||||
return cls(0x99AAB5)
|
||||
|
||||
@classmethod
|
||||
def ash_theme(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x2E2E34``.
|
||||
|
||||
This will appear transparent on Discord's ash theme.
|
||||
|
||||
.. colour:: #2E2E34
|
||||
|
||||
.. versionadded:: 2.6
|
||||
"""
|
||||
return cls(0x2E2E34)
|
||||
|
||||
@classmethod
|
||||
def dark_theme(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x313338``.
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x1A1A1E``.
|
||||
|
||||
This will appear transparent on Discord's dark theme.
|
||||
|
||||
.. colour:: #313338
|
||||
.. colour:: #1A1A1E
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
.. versionchanged:: 2.2
|
||||
Updated colour from previous ``0x36393F`` to reflect discord theme changes.
|
||||
|
||||
.. versionchanged:: 2.6
|
||||
Updated colour from previous ``0x313338`` to reflect discord theme changes.
|
||||
"""
|
||||
return cls(0x313338)
|
||||
return cls(0x1A1A1E)
|
||||
|
||||
@classmethod
|
||||
def onyx_theme(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x070709``.
|
||||
|
||||
This will appear transparent on Discord's onyx theme.
|
||||
|
||||
.. colour:: #070709
|
||||
|
||||
.. versionadded:: 2.6
|
||||
"""
|
||||
return cls(0x070709)
|
||||
|
||||
@classmethod
|
||||
def light_theme(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0xFBFBFB``.
|
||||
|
||||
This will appear transparent on Discord's light theme.
|
||||
|
||||
.. colour:: #FBFBFB
|
||||
|
||||
.. versionadded:: 2.6
|
||||
"""
|
||||
return cls(0xFBFBFB)
|
||||
|
||||
@classmethod
|
||||
def fuchsia(cls) -> Self:
|
||||
@ -493,24 +533,51 @@ class Colour:
|
||||
return cls(0xFEE75C)
|
||||
|
||||
@classmethod
|
||||
def dark_embed(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x2B2D31``.
|
||||
def ash_embed(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x37373E``.
|
||||
|
||||
.. colour:: #2B2D31
|
||||
.. colour:: #37373E
|
||||
|
||||
.. versionadded:: 2.6
|
||||
|
||||
"""
|
||||
return cls(0x37373E)
|
||||
|
||||
@classmethod
|
||||
def dark_embed(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x242429``.
|
||||
|
||||
.. colour:: #242429
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
.. versionchanged:: 2.6
|
||||
Updated colour from previous ``0x2B2D31`` to reflect discord theme changes.
|
||||
"""
|
||||
return cls(0x2B2D31)
|
||||
return cls(0x242429)
|
||||
|
||||
@classmethod
|
||||
def onyx_embed(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0x131416``.
|
||||
|
||||
.. colour:: #131416
|
||||
|
||||
.. versionadded:: 2.6
|
||||
"""
|
||||
return cls(0x131416)
|
||||
|
||||
@classmethod
|
||||
def light_embed(cls) -> Self:
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0xEEEFF1``.
|
||||
"""A factory method that returns a :class:`Colour` with a value of ``0xFFFFFF``.
|
||||
|
||||
.. colour:: #EEEFF1
|
||||
|
||||
.. versionadded:: 2.2
|
||||
|
||||
.. versionchanged:: 2.6
|
||||
Updated colour from previous ``0xEEEFF1`` to reflect discord theme changes.
|
||||
"""
|
||||
return cls(0xEEEFF1)
|
||||
return cls(0xFFFFFF)
|
||||
|
||||
@classmethod
|
||||
def pink(cls) -> Self:
|
||||
|
Reference in New Issue
Block a user