예제 #1
0
print(colour.Luv_to_XYZ(Luv))

print('\n')

message_box(('Converting to "u"v"" chromaticity coordinates from given '
             '"CIE Luv" colourspace values:\n'
             '\n\t{0}'.format(Luv)))
print(colour.Luv_to_uv(Luv))

print('\n')

uv = (0.25895878, 0.51031344)
message_box(('Converting to "xy" chromaticity coordinates from given '
             '"CIE Luv" colourspace "u"v"" chromaticity coordinates:\n'
             '\n\t{0}'.format(uv)))
print(colour.Luv_uv_to_xy(uv))

print('\n')

message_box(('Converting to "CIE LCHuv" colourspace from given "CIE Luv" '
             'colourspace values:\n'
             '\n\t{0}'.format(Luv)))
print(colour.Luv_to_LCHuv(Luv))

print('\n')

LCHuv = (100.00000000, 70.90111393, 24.06324597)
message_box(('Converting to "CIE Luv" colourspace from given "CIE LCHuv" '
             'colourspace values:\n'
             '\n\t{0}'.format(LCHuv)))
print(colour.LCHuv_to_Luv(LCHuv))
예제 #2
0
    [0.45079660, 0.52288689],
    [0.19124902, 0.55444488],
    [0.13128455, 0.51210591],
    [0.14889223, 0.37091478],
    [0.28992574, 0.30964533],
]
swatches_XYZ = []
for patch in swatches:
    in_XYZ = colour.Luv_to_XYZ(colour.uv_to_Luv(patch))
    swatches_XYZ.append(in_XYZ * (average_luminance / in_XYZ[1]))

# Adapting Luminance, 250 cd/m^2 represents a typical modern computer
# display peak luminance.
L_a = 250 * average_luminance

bg_grey = colour.xy_to_XYZ(colour.Luv_uv_to_xy(wp)) * average_luminance

swatches_normal = []
swatches_VCC = []
swatches_VAC = []

for i in range(len(swatches)):
    VCC = colour.HelmholtzKohlrausch_effect_luminous_Nayatani1997(swatches[i],
                                                                  wp,
                                                                  L_a,
                                                                  method="VCC")
    VAC = colour.HelmholtzKohlrausch_effect_luminous_Nayatani1997(swatches[i],
                                                                  wp,
                                                                  L_a,
                                                                  method="VAC")