aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/utilities
diff options
context:
space:
mode:
authorGravatar brad90four <[email protected]>2021-09-15 16:16:52 -0400
committerGravatar Chris Lovering <[email protected]>2021-10-05 16:42:48 +0100
commit85de760ad006575bfb61472be0aa346406ac7d2c (patch)
treecdf53813a37764708c9e772ab9f759b7c35c2cfb /bot/exts/utilities
parentLoad json file once (diff)
Fix Flake8 spacing errors
Diffstat (limited to 'bot/exts/utilities')
-rw-r--r--bot/exts/utilities/color.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/bot/exts/utilities/color.py b/bot/exts/utilities/color.py
index dd470197..eb9d5f4d 100644
--- a/bot/exts/utilities/color.py
+++ b/bot/exts/utilities/color.py
@@ -155,19 +155,19 @@ class Color(commands.Cog):
def _rgb_to_hsv(rgb_color: tuple[int, int, int]) -> tuple[int, int, int]:
"""To convert from `RGB` to `HSV` color space."""
r, g, b = rgb_color
- h, v, s = colorsys.rgb_to_hsv(r/float(255), g/float(255), b/float(255))
- h = round(h*360)
- s = round(s*100)
- v = round(v*100)
+ h, v, s = colorsys.rgb_to_hsv(r / float(255), g / float(255), b / float(255))
+ h = round(h * 360)
+ s = round(s * 100)
+ v = round(v * 100)
return h, s, v
def _rgb_to_hsl(rgb_color: tuple[int, int, int]) -> tuple[int, int, int]:
"""To convert from `RGB` to `HSL` color space."""
r, g, b = rgb_color
- h, l, s = colorsys.rgb_to_hls(r/float(255), g/float(255), b/float(255))
- h = round(h*360)
- s = round(s*100)
- l = round(l*100) # noqa: E741 It's little `L`, Reason: To maintain consistency.
+ h, l, s = colorsys.rgb_to_hls(r / float(255), g / float(255), b / float(255))
+ h = round(h * 360)
+ s = round(s * 100)
+ l = round(l * 100) # noqa: E741 It's little `L`, Reason: To maintain consistency.
return h, s, l
hex_color = _rgb_to_hex(rgb_color)