print(colour.XYZ_to_UVW(XYZ))

print('\n')

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

print('\n')

Luv = (100.00000000, 64.73951819, 28.90956141)
message_box(('Converting to "CIE XYZ" tristimulus values from given "CIE Luv" '
             'colourspace values:\n'
             '\n\t{0}'.format(Luv)))
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))
Beispiel #2
0
from colour.utilities import message_box

wp = colour.xy_to_Luv_uv([0.31271, 0.32902])

average_luminance = 0.14

swatches = [
    [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,