message_box( f'Converting to the "Output-Referred" "sRGB" colourspace from given ' f'"CAM16-UCS" colourspace colourspace values:\n\n\t{RGB}' ) print( colour.convert( Jpapbp, "CAM16UCS", "sRGB", verbose_kwargs={"describe": "Extended", "width": 75}, ) ) J, M, h = colour.utilities.tsplit(colour.CAM16UCS_to_JMh_CAM16(Jpapbp * 100)) specification = colour.CAM_Specification_CAM16(J=J, M=M, h=h) print( colour.XYZ_to_sRGB( colour.CAM16_to_XYZ( specification, XYZ_w=colour.xy_to_XYZ( colour.CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][ "D65" ] ) * 100, L_A=64 / np.pi * 0.2, Y_b=20, ) / 100 ) )
XYZ = np.array([19.01, 20.00, 21.78]) XYZ_w = np.array([95.05, 100.00, 108.88]) L_A = 318.31 Y_b = 20.0 surround = colour.CAM16_VIEWING_CONDITIONS['Average'] message_box( ('Converting to "CAM16" colour appearance model specification ' 'using given parameters:\n' '\n\tXYZ: {0}\n\tXYZ_w: {1}\n\tL_A: {2}\n\tY_b: {3}' '\n\tSurround: {4}\n\n' 'Warning: The input domain of that definition is non standard!').format( XYZ, XYZ_w, L_A, Y_b, surround)) specification = colour.XYZ_to_CAM16(XYZ, XYZ_w, L_A, Y_b, surround) print(specification) print('\n') J = 41.73120791 C = 0.10335574 h = 217.06795977 specification = colour.CAM16_Specification(J, C, h) message_box( ('Converting to "CIE XYZ" tristimulus values using given ' 'parameters:\n' '\n\tJ: {0}\n\tC: {1}\n\th: {2}\n\tXYZ_w: {3}\n\tL_A: {4}' '\n\tY_b: {5}\n\n' 'Warning: The output range of that definition is non standard!').format( J, C, h, XYZ_w, L_A, Y_b)) print(colour.CAM16_to_XYZ(specification, XYZ_w, L_A, Y_b))
colour.utilities.tstack([ specification.J, specification.M, specification.h, ])) / 100) print('\n') Jpapbp = np.array([0.39994811, 0.09206558, 0.0812752]) message_box(('Converting to "Output-Referred" "sRGB" colourspace from given ' '"CAM16-UCS" colourspace colourspace values:\n' '\n\t{0}'.format(RGB))) print( colour.convert(Jpapbp, 'CAM16UCS', 'sRGB', verbose_kwargs={ 'describe': 'Extended', 'width': 75 })) J, M, h = colour.utilities.tsplit(colour.CAM16UCS_to_JMh_CAM16(Jpapbp * 100)) specification = colour.CAM_Specification_CAM16(J=J, M=M, h=h) print( colour.XYZ_to_sRGB( colour.CAM16_to_XYZ( specification, XYZ_w=colour.xy_to_XYZ(colour.CCS_ILLUMINANTS[ 'CIE 1931 2 Degree Standard Observer']['D65']) * 100, L_A=64 / np.pi * 0.2, Y_b=20) / 100))
XYZ_w = np.array([95.05, 100.00, 108.88]) L_A = 318.31 Y_b = 20.0 surround = colour.VIEWING_CONDITIONS_CAM16["Average"] message_box(f'Converting to the "CAM16" colour appearance model specification ' f"using given parameters:\n\n" f"\tXYZ: {XYZ}\n" f"\tXYZ_w: {XYZ_w}\n" f"\tL_A: {L_A}\n" f"\tY_b: {Y_b}\n" f"\tSurround: {surround}") specification = colour.XYZ_to_CAM16(XYZ, XYZ_w, L_A, Y_b, surround) print(specification) print("\n") J = 41.73120791 C = 0.10335574 h = 217.06795977 specification = colour.CAM_Specification_CAM16(J, C, h) message_box( f'Converting to "CIE XYZ" tristimulus values using given parameters:\n\n' f"\tJ: {J}\n" f"\tC: {C}\n" f"\th: {h}\n" f"\tXYZ_w: {XYZ_w}\n" f"\tL_A: {L_A}\n" f"\tY_b: {Y_b}\n" f"\tSurround: {surround}") print(colour.CAM16_to_XYZ(specification, XYZ_w, L_A, Y_b, surround))