diff options
| author | 2021-09-15 16:16:52 -0400 | |
|---|---|---|
| committer | 2021-09-15 16:16:52 -0400 | |
| commit | 674221ead6d5376b22a1ea31bcec0cbadecd6104 (patch) | |
| tree | 04717b6ad445d21eac38c70891834123bac8cc81 /bot/exts | |
| parent | Load json file once (diff) | |
Fix Flake8 spacing errors
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/utilities/color.py | 16 | 
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) | 
