From 2dd94ea6b5eca89613a4173605106b965cbb5ac7 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 26 Dec 2025 14:11:20 +0100 Subject: [PATCH 01/11] :wastebasket: Deprecate theme-related `Colour` methods --- discord/colour.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/discord/colour.py b/discord/colour.py index 0ec77d5786..f810a0c5cd 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -29,6 +29,8 @@ import random from typing import Any, TypeVar +from typing_extensions import deprecated + __all__ = ( "Colour", "Color", @@ -299,6 +301,9 @@ def greyple(cls: type[CT]) -> CT: return cls(0x99AAB5) @classmethod + @deprecated( + "Colour.dark_theme is deprecated since version 2.7.1 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." + ) def dark_theme(cls: type[CT]) -> CT: """A factory method that returns a :class:`Colour` with a value of ``0x36393F``. This will appear transparent on Discord's dark theme. @@ -332,6 +337,9 @@ def nitro_pink(cls: type[CT]) -> CT: return cls(0xF47FFF) @classmethod + @deprecated( + "Colour.embed_background is deprecated since version 2.7.1 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." + ) def embed_background(cls: type[CT], theme: str = "dark") -> CT: """A factory method that returns a :class:`Colour` corresponding to the embed colours on discord clients, with a value of: From addf82c27592a8724490f2af02ae6c7149175e22 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 26 Dec 2025 14:12:57 +0100 Subject: [PATCH 02/11] :memo: CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c8c0b6a3f..0ee4eb2141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ These changes are available on the `master` branch, but have not yet been releas ### Deprecated +- Deprecated `Colour.dark_theme()` and `Colour.embed_background()`. + ([#3043](https://github.com/Pycord-Development/pycord/pull/3043)) + ### Removed ## [2.7.0] - 2025-12-24 From 392eac0296286436162c600b80547b80e95c26fe Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 26 Dec 2025 15:27:06 +0100 Subject: [PATCH 03/11] :recycle: Update `Colour` class docstring to remove mention of roles --- discord/colour.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/colour.py b/discord/colour.py index f810a0c5cd..df47bddce2 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -40,7 +40,7 @@ class Colour: - """Represents a Discord role colour. This class is similar + """Represents a Colour. This class is similar to a (red, green, blue) :class:`tuple`. There is an alias for this called Color. From 9ea4c57cfcc4668b2953295aaf346d431737bdb3 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 26 Dec 2025 15:35:42 +0100 Subject: [PATCH 04/11] :label: Replace `type[CT]` with `type[Self]` and apply `@override` to relevant methods in `Colour` class --- discord/colour.py | 76 +++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/discord/colour.py b/discord/colour.py index df47bddce2..3e8c1e85ba 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -29,7 +29,7 @@ import random from typing import Any, TypeVar -from typing_extensions import deprecated +from typing_extensions import Self, deprecated, override __all__ = ( "Colour", @@ -86,18 +86,22 @@ def __init__(self, value: int): def _get_byte(self, byte: int) -> int: return (self.value >> (8 * byte)) & 0xFF + @override def __eq__(self, other: Any) -> bool: return isinstance(other, Colour) and self.value == other.value + @override def __str__(self) -> str: return f"#{self.value:0>6x}" def __int__(self) -> int: return self.value + @override def __repr__(self) -> str: return f"" + @override def __hash__(self) -> int: return hash(self.value) @@ -121,27 +125,27 @@ def to_rgb(self) -> tuple[int, int, int]: return self.r, self.g, self.b @classmethod - def from_rgb(cls: type[CT], r: int, g: int, b: int) -> CT: + def from_rgb(cls: type[Self], r: int, g: int, b: int) -> Self: """Constructs a :class:`Colour` from an RGB tuple.""" return cls((r << 16) + (g << 8) + b) @classmethod - def from_hsv(cls: type[CT], h: float, s: float, v: float) -> CT: + def from_hsv(cls: type[Self], h: float, s: float, v: float) -> Self: """Constructs a :class:`Colour` from an HSV tuple.""" rgb = colorsys.hsv_to_rgb(h, s, v) return cls.from_rgb(*(int(x * 255) for x in rgb)) @classmethod - def default(cls: type[CT]) -> CT: + def default(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0``.""" return cls(0) @classmethod def random( - cls: type[CT], + cls: type[Self], *, seed: int | str | float | bytes | bytearray | None = None, - ) -> CT: + ) -> Self: """A factory method that returns a :class:`Colour` with a random hue. .. note:: @@ -162,17 +166,17 @@ def random( return cls.from_hsv(rand.random(), 1, 1) @classmethod - def teal(cls: type[CT]) -> CT: + def teal(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x1abc9c``.""" return cls(0x1ABC9C) @classmethod - def dark_teal(cls: type[CT]) -> CT: + def dark_teal(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x11806a``.""" return cls(0x11806A) @classmethod - def brand_green(cls: type[CT]) -> CT: + def brand_green(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x57F287``. .. versionadded:: 2.0 @@ -180,67 +184,67 @@ def brand_green(cls: type[CT]) -> CT: return cls(0x57F287) @classmethod - def green(cls: type[CT]) -> CT: + def green(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x2ecc71``.""" return cls(0x2ECC71) @classmethod - def dark_green(cls: type[CT]) -> CT: + def dark_green(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x1f8b4c``.""" return cls(0x1F8B4C) @classmethod - def blue(cls: type[CT]) -> CT: + def blue(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x3498db``.""" return cls(0x3498DB) @classmethod - def dark_blue(cls: type[CT]) -> CT: + def dark_blue(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x206694``.""" return cls(0x206694) @classmethod - def purple(cls: type[CT]) -> CT: + def purple(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x9b59b6``.""" return cls(0x9B59B6) @classmethod - def dark_purple(cls: type[CT]) -> CT: + def dark_purple(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x71368a``.""" return cls(0x71368A) @classmethod - def magenta(cls: type[CT]) -> CT: + def magenta(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xe91e63``.""" return cls(0xE91E63) @classmethod - def dark_magenta(cls: type[CT]) -> CT: + def dark_magenta(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xad1457``.""" return cls(0xAD1457) @classmethod - def gold(cls: type[CT]) -> CT: + def gold(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xf1c40f``.""" return cls(0xF1C40F) @classmethod - def dark_gold(cls: type[CT]) -> CT: + def dark_gold(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xc27c0e``.""" return cls(0xC27C0E) @classmethod - def orange(cls: type[CT]) -> CT: + def orange(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xe67e22``.""" return cls(0xE67E22) @classmethod - def dark_orange(cls: type[CT]) -> CT: + def dark_orange(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xa84300``.""" return cls(0xA84300) @classmethod - def brand_red(cls: type[CT]) -> CT: + def brand_red(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xED4245``. .. versionadded:: 2.0 @@ -248,55 +252,55 @@ def brand_red(cls: type[CT]) -> CT: return cls(0xED4245) @classmethod - def red(cls: type[CT]) -> CT: + def red(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xe74c3c``.""" return cls(0xE74C3C) @classmethod - def dark_red(cls: type[CT]) -> CT: + def dark_red(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x992d22``.""" return cls(0x992D22) @classmethod - def lighter_grey(cls: type[CT]) -> CT: + def lighter_grey(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x95a5a6``.""" return cls(0x95A5A6) lighter_gray = lighter_grey @classmethod - def dark_grey(cls: type[CT]) -> CT: + def dark_grey(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x607d8b``.""" return cls(0x607D8B) dark_gray = dark_grey @classmethod - def light_grey(cls: type[CT]) -> CT: + def light_grey(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x979c9f``.""" return cls(0x979C9F) light_gray = light_grey @classmethod - def darker_grey(cls: type[CT]) -> CT: + def darker_grey(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x546e7a``.""" return cls(0x546E7A) darker_gray = darker_grey @classmethod - def og_blurple(cls: type[CT]) -> CT: + def og_blurple(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x7289da``.""" return cls(0x7289DA) @classmethod - def blurple(cls: type[CT]) -> CT: + def blurple(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x5865F2``.""" return cls(0x5865F2) @classmethod - def greyple(cls: type[CT]) -> CT: + def greyple(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x99aab5``.""" return cls(0x99AAB5) @@ -304,7 +308,7 @@ def greyple(cls: type[CT]) -> CT: @deprecated( "Colour.dark_theme is deprecated since version 2.7.1 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." ) - def dark_theme(cls: type[CT]) -> CT: + def dark_theme(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x36393F``. This will appear transparent on Discord's dark theme. @@ -313,7 +317,7 @@ def dark_theme(cls: type[CT]) -> CT: return cls(0x36393F) @classmethod - def fuchsia(cls: type[CT]) -> CT: + def fuchsia(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xEB459E``. .. versionadded:: 2.0 @@ -321,7 +325,7 @@ def fuchsia(cls: type[CT]) -> CT: return cls(0xEB459E) @classmethod - def yellow(cls: type[CT]) -> CT: + def yellow(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xFEE75C``. .. versionadded:: 2.0 @@ -329,7 +333,7 @@ def yellow(cls: type[CT]) -> CT: return cls(0xFEE75C) @classmethod - def nitro_pink(cls: type[CT]) -> CT: + def nitro_pink(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xf47fff``. .. versionadded:: 2.0 @@ -340,7 +344,7 @@ def nitro_pink(cls: type[CT]) -> CT: @deprecated( "Colour.embed_background is deprecated since version 2.7.1 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." ) - def embed_background(cls: type[CT], theme: str = "dark") -> CT: + def embed_background(cls: type[Self], theme: str = "dark") -> Self: """A factory method that returns a :class:`Colour` corresponding to the embed colours on discord clients, with a value of: From 5bb6b81e920807f948b8d51e134debb4ffe93474 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sun, 28 Dec 2025 23:51:50 +0100 Subject: [PATCH 05/11] :coffin: Remove dead TypeVar --- discord/colour.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/discord/colour.py b/discord/colour.py index 3e8c1e85ba..aa4690dcf1 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -27,7 +27,7 @@ import colorsys import random -from typing import Any, TypeVar +from typing import Any from typing_extensions import Self, deprecated, override @@ -36,8 +36,6 @@ "Color", ) -CT = TypeVar("CT", bound="Colour") - class Colour: """Represents a Colour. This class is similar From 93f2992ffdf5c248147c1211c2ee7fd453311003 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 13 Feb 2026 17:51:19 +0100 Subject: [PATCH 06/11] :sparkles: Add new theme-specific `Colour` methods and update `dark_theme` - Introduced `light_theme`, `ash_theme`, and `onyx_theme` methods for Discord's new theme options. - Updated `dark_theme` to align with Discord's onyx theme. - Adjusted deprecation details for `embed_background`. --- discord/colour.py | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/discord/colour.py b/discord/colour.py index ef0a22184f..731763649e 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -315,16 +315,43 @@ def greyple(cls: type[Self]) -> Self: return cls(0x99AAB5) @classmethod - @deprecated( - "Colour.dark_theme is deprecated since version 2.7.1 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." - ) + def light_theme(cls: type[Self]) -> Self: + """A factory method that returns a :class:`Colour` with a value of ``0xfbfbfb``. + This will appear transparent on Discord's light theme. + + .. versionadded:: 2.8 + """ + return cls(0xFBFBFB) + + @classmethod + def ash_theme(cls: type[Self]) -> Self: + """A factory method that returns a :class:`Colour` with a value of ``0x323339``. + This will appear transparent on Discord's ash theme. + + .. versionadded:: 2.8 + """ + return cls(0x323339) + + @classmethod def dark_theme(cls: type[Self]) -> Self: - """A factory method that returns a :class:`Colour` with a value of ``0x36393F``. - This will appear transparent on Discord's dark theme. + """A factory method that returns a :class:`Colour` with a value of ``0x1a1a1e``. + This will appear transparent on Discord's onyx theme. .. versionadded:: 1.5 + + .. versionchanged:: 2.8 + Updated to match new Discord theme colour. + """ + return cls(0x1A1A1E) + + @classmethod + def onyx_theme(cls: type[Self]) -> Self: + """A factory method that returns a :class:`Colour` with a value of ``0x070709``. + This will appear transparent on Discord's onyx theme. + + .. versionadded:: 2.8 """ - return cls(0x36393F) + return cls(0x070709) @classmethod def fuchsia(cls: type[Self]) -> Self: @@ -352,7 +379,7 @@ def nitro_pink(cls: type[Self]) -> Self: @classmethod @deprecated( - "Colour.embed_background is deprecated since version 2.7.1 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." + "Colour.embed_background is deprecated since version 2.8 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." ) def embed_background(cls: type[Self], theme: str = "dark") -> Self: """A factory method that returns a :class:`Colour` corresponding to the From 0a97622610b39519bfc7e9dee6b6e34a19740b05 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 21 Feb 2026 18:19:53 +0100 Subject: [PATCH 07/11] Update discord/colour.py Co-authored-by: plun1331 Signed-off-by: Paillat --- discord/colour.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/colour.py b/discord/colour.py index 731763649e..5c95933876 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -335,7 +335,7 @@ def ash_theme(cls: type[Self]) -> Self: @classmethod def dark_theme(cls: type[Self]) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x1a1a1e``. - This will appear transparent on Discord's onyx theme. + This will appear transparent on Discord's dark theme. .. versionadded:: 1.5 From dc842004c106fa1961a19e9a9da955fd1dabb93a Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sat, 21 Feb 2026 18:23:02 +0100 Subject: [PATCH 08/11] :label: Update typings --- discord/colour.py | 76 +++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/discord/colour.py b/discord/colour.py index 5c95933876..ee92a33c3e 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -123,7 +123,7 @@ def to_rgb(self) -> tuple[int, int, int]: return self.r, self.g, self.b @classmethod - def resolve_value(cls: type[CT], value: int | Colour | None) -> CT: + def resolve_value(cls, value: int | Colour | None) -> Self: if value is None or isinstance(value, Colour): return value elif isinstance(value, int): @@ -135,24 +135,24 @@ def resolve_value(cls: type[CT], value: int | Colour | None) -> CT: ) @classmethod - def from_rgb(cls: type[Self], r: int, g: int, b: int) -> Self: + def from_rgb(cls, r: int, g: int, b: int) -> Self: """Constructs a :class:`Colour` from an RGB tuple.""" return cls((r << 16) + (g << 8) + b) @classmethod - def from_hsv(cls: type[Self], h: float, s: float, v: float) -> Self: + def from_hsv(cls, h: float, s: float, v: float) -> Self: """Constructs a :class:`Colour` from an HSV tuple.""" rgb = colorsys.hsv_to_rgb(h, s, v) return cls.from_rgb(*(int(x * 255) for x in rgb)) @classmethod - def default(cls: type[Self]) -> Self: + def default(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0``.""" return cls(0) @classmethod def random( - cls: type[Self], + cls, *, seed: int | str | float | bytes | bytearray | None = None, ) -> Self: @@ -176,17 +176,17 @@ def random( return cls.from_hsv(rand.random(), 1, 1) @classmethod - def teal(cls: type[Self]) -> Self: + def teal(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x1abc9c``.""" return cls(0x1ABC9C) @classmethod - def dark_teal(cls: type[Self]) -> Self: + def dark_teal(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x11806a``.""" return cls(0x11806A) @classmethod - def brand_green(cls: type[Self]) -> Self: + def brand_green(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x57F287``. .. versionadded:: 2.0 @@ -194,67 +194,67 @@ def brand_green(cls: type[Self]) -> Self: return cls(0x57F287) @classmethod - def green(cls: type[Self]) -> Self: + def green(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x2ecc71``.""" return cls(0x2ECC71) @classmethod - def dark_green(cls: type[Self]) -> Self: + def dark_green(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x1f8b4c``.""" return cls(0x1F8B4C) @classmethod - def blue(cls: type[Self]) -> Self: + def blue(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x3498db``.""" return cls(0x3498DB) @classmethod - def dark_blue(cls: type[Self]) -> Self: + def dark_blue(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x206694``.""" return cls(0x206694) @classmethod - def purple(cls: type[Self]) -> Self: + def purple(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x9b59b6``.""" return cls(0x9B59B6) @classmethod - def dark_purple(cls: type[Self]) -> Self: + def dark_purple(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x71368a``.""" return cls(0x71368A) @classmethod - def magenta(cls: type[Self]) -> Self: + def magenta(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xe91e63``.""" return cls(0xE91E63) @classmethod - def dark_magenta(cls: type[Self]) -> Self: + def dark_magenta(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xad1457``.""" return cls(0xAD1457) @classmethod - def gold(cls: type[Self]) -> Self: + def gold(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xf1c40f``.""" return cls(0xF1C40F) @classmethod - def dark_gold(cls: type[Self]) -> Self: + def dark_gold(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xc27c0e``.""" return cls(0xC27C0E) @classmethod - def orange(cls: type[Self]) -> Self: + def orange(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xe67e22``.""" return cls(0xE67E22) @classmethod - def dark_orange(cls: type[Self]) -> Self: + def dark_orange(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xa84300``.""" return cls(0xA84300) @classmethod - def brand_red(cls: type[Self]) -> Self: + def brand_red(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xED4245``. .. versionadded:: 2.0 @@ -262,60 +262,60 @@ def brand_red(cls: type[Self]) -> Self: return cls(0xED4245) @classmethod - def red(cls: type[Self]) -> Self: + def red(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xe74c3c``.""" return cls(0xE74C3C) @classmethod - def dark_red(cls: type[Self]) -> Self: + def dark_red(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x992d22``.""" return cls(0x992D22) @classmethod - def lighter_grey(cls: type[Self]) -> Self: + def lighter_grey(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x95a5a6``.""" return cls(0x95A5A6) lighter_gray = lighter_grey @classmethod - def dark_grey(cls: type[Self]) -> Self: + def dark_grey(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x607d8b``.""" return cls(0x607D8B) dark_gray = dark_grey @classmethod - def light_grey(cls: type[Self]) -> Self: + def light_grey(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x979c9f``.""" return cls(0x979C9F) light_gray = light_grey @classmethod - def darker_grey(cls: type[Self]) -> Self: + def darker_grey(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x546e7a``.""" return cls(0x546E7A) darker_gray = darker_grey @classmethod - def og_blurple(cls: type[Self]) -> Self: + def og_blurple(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x7289da``.""" return cls(0x7289DA) @classmethod - def blurple(cls: type[Self]) -> Self: + def blurple(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x5865F2``.""" return cls(0x5865F2) @classmethod - def greyple(cls: type[Self]) -> Self: + def greyple(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x99aab5``.""" return cls(0x99AAB5) @classmethod - def light_theme(cls: type[Self]) -> Self: + 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. @@ -324,7 +324,7 @@ def light_theme(cls: type[Self]) -> Self: return cls(0xFBFBFB) @classmethod - def ash_theme(cls: type[Self]) -> Self: + def ash_theme(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x323339``. This will appear transparent on Discord's ash theme. @@ -333,7 +333,7 @@ def ash_theme(cls: type[Self]) -> Self: return cls(0x323339) @classmethod - def dark_theme(cls: type[Self]) -> Self: + def dark_theme(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0x1a1a1e``. This will appear transparent on Discord's dark theme. @@ -345,7 +345,7 @@ def dark_theme(cls: type[Self]) -> Self: return cls(0x1A1A1E) @classmethod - def onyx_theme(cls: type[Self]) -> Self: + 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. @@ -354,7 +354,7 @@ def onyx_theme(cls: type[Self]) -> Self: return cls(0x070709) @classmethod - def fuchsia(cls: type[Self]) -> Self: + def fuchsia(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xEB459E``. .. versionadded:: 2.0 @@ -362,7 +362,7 @@ def fuchsia(cls: type[Self]) -> Self: return cls(0xEB459E) @classmethod - def yellow(cls: type[Self]) -> Self: + def yellow(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xFEE75C``. .. versionadded:: 2.0 @@ -370,7 +370,7 @@ def yellow(cls: type[Self]) -> Self: return cls(0xFEE75C) @classmethod - def nitro_pink(cls: type[Self]) -> Self: + def nitro_pink(cls) -> Self: """A factory method that returns a :class:`Colour` with a value of ``0xf47fff``. .. versionadded:: 2.0 @@ -381,7 +381,7 @@ def nitro_pink(cls: type[Self]) -> Self: @deprecated( "Colour.embed_background is deprecated since version 2.8 and will be removed in version 3.0. This is not relevant anymore since Discord provides the custom themes feature." ) - def embed_background(cls: type[Self], theme: str = "dark") -> Self: + def embed_background(cls, theme: str = "dark") -> Self: """A factory method that returns a :class:`Colour` corresponding to the embed colours on discord clients, with a value of: From 66187f8f965f4f977892dd69fb7ba0b69d423bc0 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sat, 21 Feb 2026 18:26:10 +0100 Subject: [PATCH 09/11] :memo: Clarify versionchanged note for `theme` colour --- discord/colour.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/colour.py b/discord/colour.py index ee92a33c3e..420ab9096f 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -340,7 +340,7 @@ def dark_theme(cls) -> Self: .. versionadded:: 1.5 .. versionchanged:: 2.8 - Updated to match new Discord theme colour. + Updated to match Discord's new theme colour. """ return cls(0x1A1A1E) From ad955051961cf56a774524fc3d5fa45b7b263756 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sat, 21 Feb 2026 18:27:27 +0100 Subject: [PATCH 10/11] :memo: Update CHANGELOG.md with new `Colour` methods and updates to deprecated items --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a7148ad7a..9dc2e00411 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,17 +14,21 @@ These changes are available on the `master` branch, but have not yet been releas - Added `Member.colours` and `Member.colors` properties. ([#3063](https://github.com/Pycord-Development/pycord/pull/3063)) +- Added `Colour.light_theme()`, `Colour.ash_theme()` and `Colour.onyx_theme()`. + ([#3043](https://github.com/Pycord-Development/pycord/pull/3043)) ### Changed - Changed `Member.colour` and `Member.color` to be aliases for `Member.colours.primary`. ([#3063](https://github.com/Pycord-Development/pycord/pull/3063)) +- Updated `Colour.dark_theme()` with Discord's new theme colours. + ([#3043](https://github.com/Pycord-Development/pycord/pull/3043)) ### Fixed ### Deprecated -- Deprecated `Colour.dark_theme()` and `Colour.embed_background()`. +- Deprecated `Colour.embed_background()`. ([#3043](https://github.com/Pycord-Development/pycord/pull/3043)) ### Removed From c6bc6cd64ba81a8dd992f350ff74d66f0d767487 Mon Sep 17 00:00:00 2001 From: Paillat Date: Mon, 23 Feb 2026 09:35:47 +0100 Subject: [PATCH 11/11] Update CHANGELOG.md Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Paillat --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e9a0e28f4..3a9aa3e179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ These changes are available on the `master` branch, but have not yet been releas - Added `Member.colours` and `Member.colors` properties. ([#3063](https://github.com/Pycord-Development/pycord/pull/3063)) -- Added `Colour.light_theme()`, `Colour.ash_theme()` and `Colour.onyx_theme()`. +- Added `Colour.light_theme()`, `Colour.ash_theme()`, and `Colour.onyx_theme()`. ([#3043](https://github.com/Pycord-Development/pycord/pull/3043)) - Added the ability to respond to interactions with suppressed push and desktop notifications. ([#3062](https://github.com/Pycord-Development/pycord/pull/3062))