diff options
author | 2021-09-21 06:51:55 -0400 | |
---|---|---|
committer | 2021-10-05 16:42:49 +0100 | |
commit | fe2b7d442bec05ab02836e2c5d7613d738fd5151 (patch) | |
tree | 362aac9b1bb4e2b27250d47fccc7071553bb90bd | |
parent | Add all color modes and name matching (diff) |
fix: remove redundant rgb_color variable
The conversion functions from hsv, hsl and cmyk now return r, g, b
instead of a variable rgb_tuple.
-rw-r--r-- | bot/exts/utilities/color.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bot/exts/utilities/color.py b/bot/exts/utilities/color.py index 9b1f3776..542a2e19 100644 --- a/bot/exts/utilities/color.py +++ b/bot/exts/utilities/color.py @@ -293,8 +293,7 @@ class Color(commands.Cog): r = int(r * 255) g = int(g * 255) b = int(b * 255) - rgb_color = (r, g, b) - return rgb_color + return r, g, b @staticmethod def hsl_to_rgb(input_color: tuple[int, int, int]) -> tuple[int, int, int]: @@ -308,8 +307,7 @@ class Color(commands.Cog): r = int(r * 255) g = int(g * 255) b = int(b * 255) - rgb_color = (r, g, b) - return rgb_color + return r, g, b @staticmethod def cmyk_to_rgb(input_color: tuple[int, int, int, int]) -> tuple[int, int, int]: @@ -321,8 +319,7 @@ class Color(commands.Cog): r = int(255 * (1.0 - c / float(100)) * (1.0 - k / float(100))) g = int(255 * (1.0 - m / float(100)) * (1.0 - k / float(100))) b = int(255 * (1.0 - y / float(100)) * (1.0 - k / float(100))) - rgb_color = (r, g, b) - return rgb_color + return r, g, b def setup(bot: Bot) -> None: |