colour.read_spds_from_xrite_file

colour.read_spds_from_xrite_file(path)[source]

Reads the spectral data from given X-Rite file and returns it as an OrderedDict of colour.SpectralPowerDistribution classes.

Parameters:path (unicode) – Absolute X-Rite file path.
Returns:colour.SpectralPowerDistribution classes of given X-Rite file.
Return type:OrderedDict

Notes

  • This parser is minimalistic and absolutely not bullet proof.

Examples

>>> import os
>>> from pprint import pprint
>>> xrite_file = os.path.join(os.path.dirname(__file__), 'tests',
...                           'resources',
...                           'xrite_digital_colour_checker.txt')
>>> spds_data = read_spds_from_xrite_file(xrite_file)
>>> pprint(list(spds_data.keys()))  
['X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8', 'X9', 'X10']