xyY = (0.4316, 0.3777, 0.1008)
message_box(('Computing "Lightness" "CIE Lab" reference value for given '
             '"CIE xyY" colourspace values:\n'
             '\n\t{0}'.format(xyY)))
print(np.ravel(colour.XYZ_to_Lab(colour.xyY_to_XYZ(xyY)))[0])

print('\n')

Y = 10.08
message_box(('Computing "Lightness" using '
             '"Glasser, Mckinney, Reilly and Schnelle (1958)" method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness_Glasser1958(Y))
print(colour.lightness(Y, method='Glasser 1958'))

print('\n')

message_box(('Computing "Lightness" using "Wyszecki (1963)" method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness_Wyszecki1963(Y))
print(colour.lightness(Y, method='Wyszecki 1963'))

print('\n')

message_box(('Computing "Lightness" using "Fairchild and Wyble (2010)" method '
             'for given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness_Fairchild2010(Y / 100.0))
Exemple #2
0
xyY = (0.4316, 0.3777, 0.1008)
message_box(('Computing "Lightness" "CIE Lab" reference value for given '
             '"CIE xyY" colourspace values:\n'
             '\n\t{0}'.format(xyY)))
print(np.ravel(colour.XYZ_to_Lab(colour.xyY_to_XYZ(xyY)))[0])

print('\n')

Y = 10.08
message_box(('Computing "Lightness" using '
             'Glasser, Mckinney, Reilly and Schnelle (1958) method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness_Glasser1958(Y))
print(colour.lightness(Y, method='Glasser 1958'))

print('\n')

message_box(('Computing "Lightness" using Wyszecki (1963) method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness_Wyszecki1963(Y))
print(colour.lightness(Y, method='Wyszecki 1963'))

print('\n')

message_box(('Computing "Lightness" using CIE 1976 method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness_1976(Y))
Exemple #3
0
message_box('"Lightness" Computations')

xyY = np.array([0.4316, 0.3777, 0.1008])
message_box(
    f'Computing "Lightness" "CIE L*a*b*" reference value for given "CIE xyY" '
    f"colourspace values:\n\n\t{xyY}")
print(np.ravel(colour.XYZ_to_Lab(colour.xyY_to_XYZ(xyY)))[0])

print("\n")

Y = 12.19722535
message_box(
    f'Computing "Lightness" using '
    f'"Glasser, Mckinney, Reilly and Schnelle (1958)" method for given '
    f'"luminance" value:\n\n\t{Y}')
print(colour.lightness(Y, method="Glasser 1958"))
print(colour.colorimetry.lightness_Glasser1958(Y))

print("\n")

message_box(f'Computing "Lightness" using "Wyszecki (1963)" method for given '
            f'"luminance" value:\n\n\t{Y}')
print(colour.lightness(Y, method="Wyszecki 1963"))
print(colour.colorimetry.lightness_Wyszecki1963(Y))

print("\n")

message_box(
    f'Computing "Lightness" using "Fairchild and Wyble (2010)" method for '
    f'given "luminance" value:\n\n\t{Y}')
print(colour.lightness(Y, method="Fairchild 2010"))
message_box('"Lightness" Computations')

xyY = np.array([0.4316, 0.3777, 0.1008])
message_box(('Computing "Lightness" "CIE L*a*b*" reference value for given '
             '"CIE xyY" colourspace values:\n'
             '\n\t{0}'.format(xyY)))
print(np.ravel(colour.XYZ_to_Lab(colour.xyY_to_XYZ(xyY)))[0])

print('\n')

Y = 12.19722535
message_box(('Computing "Lightness" using '
             '"Glasser, Mckinney, Reilly and Schnelle (1958)" method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness(Y, method='Glasser 1958'))
print(colour.colorimetry.lightness_Glasser1958(Y))

print('\n')

message_box(('Computing "Lightness" using "Wyszecki (1963)" method for '
             'given "luminance" value:\n'
             '\n\t{0}'.format(Y)))
print(colour.lightness(Y, method='Wyszecki 1963'))
print(colour.colorimetry.lightness_Wyszecki1963(Y))

print('\n')

message_box(('Computing "Lightness" using "Fairchild and Wyble (2010)" method '
             'for given "luminance" value:\n'
             '\n\t{0}'.format(Y)))