-
Hi, I wonder is there any efficient way to check out-of-gamut pixel values for a specific color space. ILLUMINANT_D50 = colour.CCS_ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D50']
srgb_colourspace = colour.models.RGB_COLOURSPACE_sRGB.chromatically_adapt(ILLUMINANT_D50)
XYZ = colour.Lab_to_XYZ(Lab_img,
illuminant=ILLUMINANT_D50)
sRGB_img = colour.models.XYZ_to_RGB(XYZ,
srgb_colourspace.whitepoint,
srgb_colourspace.whitepoint,
srgb_colourspace.matrix_XYZ_to_RGB) Then I check the Is my way right? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
The easiest way would be to convert from |
Beta Was this translation helpful? Give feedback.
The easiest way would be to convert from
ProPhoto RGB
tosRGB
directly using thecolour.RGB_to_RGB
definition and check for negative values. Positive values are not necessarily OOG, as HDR can push them way over 1.