diff --git a/discord/colour.py b/discord/colour.py index 5c9e31f26..454bafbc5 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -97,6 +97,11 @@ class Colour: """Returns an (r, g, b) tuple representing the colour.""" return (self.r, self.g, self.b) + @classmethod + def from_rgb(cls, r, g, b): + """Constructs a :class:`Colour` from an RGB tuple.""" + return cls((r << 16) + (g << 8) + b) + @classmethod def default(cls): """A factory method that returns a :class:`Colour` with a value of 0."""