colour.characterisation.best_illuminant#

colour.characterisation.best_illuminant(RGB_w: ArrayLike, sensitivities: colour.characterisation.cameras.RGB_CameraSensitivities, illuminants: Mapping) colour.colorimetry.spectrum.SpectralDistribution[source]#

Select the best illuminant for given RGB white balance multipliers, and sensitivities in given series of illuminants.

Parameters
Returns

Best illuminant.

Return type

colour.SpectralDistribution

Examples

>>> path = os.path.join(
...     RESOURCES_DIRECTORY_RAWTOACES,
...     'CANON_EOS_5DMark_II_RGB_Sensitivities.csv')
>>> sensitivities = sds_and_msds_to_msds(
...     read_sds_from_csv_file(path).values())
>>> illuminants = generate_illuminants_rawtoaces_v1()
>>> RGB_w = white_balance_multipliers(
...     sensitivities, SDS_ILLUMINANTS['FL2'])
>>> best_illuminant(RGB_w, sensitivities, illuminants).name
'D40'