diff options
| author | Rapptz <[email protected]> | 2020-11-21 22:18:39 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-11-21 22:18:39 -0500 |
| commit | 6caa983b5e6d535234c8e0421f18e3d5ef3c7cd0 (patch) | |
| tree | 8f3ceacb4f055aaf421cb9840710f80658e48551 /discord/colour.py | |
| parent | Add Colour.random factory method (diff) | |
| download | discord.py-6caa983b5e6d535234c8e0421f18e3d5ef3c7cd0.tar.xz discord.py-6caa983b5e6d535234c8e0421f18e3d5ef3c7cd0.zip | |
Clarify Colour.random RNG
Diffstat (limited to 'discord/colour.py')
| -rw-r--r-- | discord/colour.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/discord/colour.py b/discord/colour.py index c2acfb4e..a9e87f3e 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -120,7 +120,15 @@ class Colour: @classmethod def random(cls): - """A factory method that returns a :class:`Colour` with a random value.""" + """A factory method that returns a :class:`Colour` with a random hue. + + .. note:: + + The random algorithm works by choosing a colour with a random hue but + with maxed out saturation and value. + + .. versionadded:: 1.6 + """ return cls.from_hsv(random.random(), 1, 1) @classmethod @@ -245,7 +253,7 @@ class Colour: def dark_theme(cls): """A factory method that returns a :class:`Colour` with a value of ``0x36393F``. This will appear transparent on Discord's dark theme. - + .. versionadded:: 1.5 """ return cls(0x36393F) |