>>> Color('oklch(1 0 0)')
Traceback (most recent call last):
File "<exec>", line 213, in execute
File "<string>", line 1, in <module>
File "/lib/python3.10/site-packages/coloraide/color.py", line 152, in __init__
self._space, self._coords = self._parse(color, data, alpha, **kwargs)
File "/lib/python3.10/site-packages/coloraide/color.py", line 228, in _parse
raise ValueError("'{}' is not a valid color".format(color))
ValueError: 'oklch(1 0 0)' is not a valid color
Basically, when we refactored some things, we messed up the parsing of oklch(). We accidentally duplicated the angle requirement but had no test in place to catch that the parsing no longer worked.
Basically, when we refactored some things, we messed up the parsing of
oklch()
. We accidentally duplicated the angle requirement but had no test in place to catch that the parsing no longer worked.