colour.characterisation.best_illuminant#

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

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

Parameters:
  • RGB_w (ArrayLike) – RGB white balance multipliers.

  • sensitivities (RGB_CameraSensitivities) – Camera RGB spectral sensitivities.

  • illuminants (Mapping) – Illuminant spectral distributions to choose the best illuminant from.

Returns:

Best illuminant.

Return type:

colour.SpectralDistribution

Examples

>>> path = os.path.join(
...     ROOT_RESOURCES_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'