colour.read_sds_from_xrite_file#

colour.read_sds_from_xrite_file(path: str | Path) Dict[str, SpectralDistribution][source]#

Read the spectral data from given X-Rite file and returns it as a dict of colour.SpectralDistribution class instances.

Parameters:

path (str | Path) – Absolute X-Rite file path.

Returns:

dict of colour.SpectralDistribution class instances.

Return type:

dict

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()))  
['X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8', 'X9', 'X10']