Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 8f1ad29

Browse files
Inf-inityInf-inity
authored andcommitted
some changes
1 parent 9d1b6bc commit 8f1ad29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

general/color_picker/cog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ class ColorPickerCog(Cog, name="Color Picker"):
3636
CONTRIBUTORS = [Contributor.Tert0, Contributor.Infinity]
3737

3838
RE_HEX = re.compile(r"^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$")
39-
RE_RGB = re.compile(r"^rgb *(\()?([0-9]{1,3}),? *([0-9]{1,3}),? *([0-9]{1,3})(?(1)\)|)$")
40-
RE_HSV = re.compile(r"^hsv *(\()?([0-9]{1,3}),? *([0-9]{1,3}),? *([0-9]{1,3})(?(1)\)|)$")
41-
RE_HSL = re.compile(r"^hsl *(\()?([0-9]{1,3}),? *([0-9]{1,3}),? *([0-9]{1,3})(?(1)\)|)$")
39+
REG = r" *(\()?([0-9]{1,3}),? *([0-9]{1,3}),? *([0-9]{1,3})(?(1)\)|)$"
40+
RE_RGB = re.compile(r"^rgb" + REG)
41+
RE_HSV = re.compile(r"^hsv" + REG)
42+
RE_HSL = re.compile(r"^hsl" + REG)
4243

4344
@commands.command(name="color_picker", aliases=["cp", "color"])
4445
@docs(t.commands.color_picker)
@@ -59,7 +60,6 @@ async def color_picker(self, ctx: Context, *, color: str):
5960
)
6061

6162
elif color_re := self.RE_HSV.match(color):
62-
print(color_re.groups())
6363
values = _to_floats(
6464
[
6565
color_args(color_re.group(2), 360),

0 commit comments

Comments
 (0)