Why color space names with parentheses, e.g. "NTSC (1987)" cannot be plotted? #1037
Replies: 3 comments 2 replies
-
Hi @yulincoder, This is expected, the signature of the definition refers to the colour.plotting.common.filter_RGB_colourspaces definition which accepts Regex patterns. It wraps itself the colour.plotting.common.filter_passthrough definition that has the use case you gave above. |
Beta Was this translation helpful? Give feedback.
-
Ok, I see. I can use |
Beta Was this translation helpful? Give feedback.
-
Thanks 🙏
…Sent from my iPhone
On 27 Aug 2022, at 08:20, Thomas Mansencal ***@***.***> wrote:
Next version of Colour will use a normal string so NTSC (1953) will work but also the new lower, slugified and canonical keys:
ntsc (1953)
ntsc-1953
ntsc1953
Cheers,
Thomas
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
Description
When I type code following:
I can't get 'NTSC (1987)' graphics. And I traced the cause of this bug:
In the function of
colour/utilities/common.py: def filter_mapping
, colorspace name matching uses regular expressionsre.match
following:Therefore, parentheses are treated as keywords of regular expressions.
Code for Reproduction
Exception Message
No response
Environment Information
Beta Was this translation helpful? Give feedback.
All reactions