A Python package implementing functionality to read and write files in the Common LUT Format (CLF).
It is open source and freely available under the BSD-3-Clause terms.
Table of Contents
The following features are available:
- Reading CLF files to a Python representation.
The following features are planned and in development:
- Writing CLF files from the Python representation.
- Validating CLF files according to the specification.
Features that will not be part of this library:
- Executing CLF workflows and applying them to colours or images. This feature will be implemented as part of Colour.
The main entry point of the library is the read_clf
function in the main namespace.
import colour_clf_io
example = """
<?xml version="1.0" ?>
<ProcessList xmlns="urn:AMPAS:CLF:v3.0" id="Example Wrapper" compCLFversion="2.0">
<LUT3D id="lut-24" name="green look" interpolation="trilinear" inBitDepth="12i" outBitDepth="16f">
<Description>3D LUT</Description>
<Array dim="2 2 2 3">
0.0 0.0 0.0
0.0 0.0 1.0
0.0 1.0 0.0
0.0 1.0 1.0
1.0 0.0 0.0
1.0 0.0 1.0
1.0 1.0 0.0
1.0 1.0 1.0
</Array>
</LUT3D>
</ProcessList>
""" # noqa: E501
clf_doc = colour_clf_io.read_clf(EXAMPLE_WRAPPER.format(example))
print(clf_doc)
ProcessList(id='Example Wrapper', compatible_CLF_version='3.0', process_nodes=[LUT3D(id='lut-24', name='green look', in_bit_depth=<BitDepth.i12: '12i'>, out_bit_depth=<BitDepth.f16: '16f'>, description='3D LUT', array=Array(values=[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0], dim=(2, 2, 2, 3)), half_domain=False, raw_halfs=False, interpolation=<Interpolation3D.TRILINEAR: 'trilinear'>)], name=None, inverse_of=None, description=[], input_descriptor='', output_descriptor='', info=Info(app_release=None, copyright=None, revision=None, aces_transform_id=None, aces_user_name=None, calibration_info=None))
Colour - CLF IO requires various dependencies in order to run:
Once the dependencies are satisfied, Colour - CLF IO can be installed from the Python Package Index by issuing this command in a shell:
pip install --user colour-clf-io
The overall development dependencies are installed as follows:
pip install --user 'colour-clf-io[development]'
If you would like to contribute to Colour - CLF IO, please refer to the following Contributing guide for Colour.
The bibliography is available in the repository in BibTeX format.
The main technical reference for Colour - CLF IO is the API Reference.
- Common LUT Format (CLF) - A Common File Format for Look-Up Tables by the Academy of Motion Picture Arts & Sciences.
OpenColorIO was used to verify parsing through the builtin transforms that are part of the library.
The Code of Conduct, adapted from the Contributor Covenant 1.4, is available on the Code of Conduct page.
The Colour Developers can be reached via different means: