Skip to content

Commit d79824c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a658d14 commit d79824c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ridgeplot/_color/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def to_rgb(color: Color) -> str:
5050

5151

5252
def unpack_rgb(rgb: str) -> tuple[float, float, float, float] | tuple[float, float, float]:
53-
prefix = rgb.split("(")[0] + "("
53+
prefix = rgb.split("(", maxsplit=1)[0] + "("
5454
values_str = map(str.strip, rgb.removeprefix(prefix).removesuffix(")").split(","))
5555
values_num = tuple(int(v) if v.isdecimal() else float(v) for v in values_str)
5656
return cast("tuple[float, float, float, float] | tuple[float, float, float]", values_num)

0 commit comments

Comments
 (0)