diff --git a/discord/colour.py b/discord/colour.py index 804173a4f..c2acfb4e5 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE. """ import colorsys +import random class Colour: """Represents a Discord role colour. This class is similar @@ -117,6 +118,11 @@ class Colour: """A factory method that returns a :class:`Colour` with a value of ``0``.""" return cls(0) + @classmethod + def random(cls): + """A factory method that returns a :class:`Colour` with a random value.""" + return cls.from_hsv(random.random(), 1, 1) + @classmethod def teal(cls): """A factory method that returns a :class:`Colour` with a value of ``0x1abc9c``."""