Skip to content

Commit 042781d

Browse files
committed
Accept cmyk colors with 4 channels only
1 parent 325000b commit 042781d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tinycss2/color5.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ def _parse_device_cmyk(args, alpha, old_syntax):
7575
else:
7676
if not color4._types(args) <= {'number', 'percentage'}:
7777
return
78+
if len(args) != 4:
79+
return
7880
cmyk = [
7981
arg.value if arg.type == 'number' else
8082
arg.value / 100 if arg.type == 'percentage' else None

0 commit comments

Comments
 (0)