colour.read_sds_from_xrite_file

colour.read_sds_from_xrite_file(path)[source]

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

Parameters:path (unicode) – Absolute X-Rite file path.
Returns:colour.SpectralDistribution 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',
...                           'X-Rite_Digital_Colour_Checker.txt')
>>> sds_data = read_sds_from_xrite_file(xrite_file)
>>> pprint(list(sds_data.keys()))  # doctest: +SKIP
['X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8', 'X9', 'X10']