From d28f0ff35b6f66bef43888ed0c1246444fe5d951 Mon Sep 17 00:00:00 2001 From: iDutchy Date: Fri, 18 Sep 2020 00:44:40 +0000 Subject: [PATCH] add hex() support to Color --- discord/colour.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/colour.py b/discord/colour.py index 95cc9378..d0252760 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -85,6 +85,9 @@ class Colour: def __int__(self): return int(str(self.value), 16) + def __hex__(self): + return self.value + @property def r(self): """:class:`int`: Returns the red component of the colour."""