Skip to main content

Library to parse and create file in the Common LUT format

Project description

Develop Build Status Coverage Status Code Grade Package Version

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.

1 Features

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.

1.1 Examples

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))

2 User Guide

2.1 Installation

2.1.1 Primary Dependencies

Colour - CLF IO requires various dependencies in order to run:

2.1.2 Pypi

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]'

2.2 Contributing

If you would like to contribute to Colour - CLF IO, please refer to the following Contributing guide for Colour.

2.3 Bibliography

The bibliography is available in the repository in BibTeX format.

3 API Reference

The main technical reference for Colour - CLF IO is the API Reference.

4 See Also

4.1 Publications

4.2 Software

OpenColorIO was used to verify parsing through the builtin transforms that are part of the library.

5 Code of Conduct

The Code of Conduct, adapted from the Contributor Covenant 1.4, is available on the Code of Conduct page.

6 Contact & Social

The Colour Developers can be reached via different means:

7 About

Colour - CLF IO by Colour Developers
Copyright 2024 Colour Developers – colour-developers@colour-science.org
This software is released under terms of BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colour_clf_io-0.1.0.tar.gz (327.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colour_clf_io-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file colour_clf_io-0.1.0.tar.gz.

File metadata

  • Download URL: colour_clf_io-0.1.0.tar.gz
  • Upload date:
  • Size: 327.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for colour_clf_io-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b7245f60755cfe7fb57fb4d209c0b8ad3d407f7ac20386970ed58457f8a621a
MD5 4e4fc99e432cba90a04137c7d5f807ff
BLAKE2b-256 1f6f98e41fae55a15d437550a7ad4d17bd20b82b240ff2a270c4bd03a681d1e4

See more details on using hashes here.

File details

Details for the file colour_clf_io-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: colour_clf_io-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for colour_clf_io-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24df16e73696dfa0a4ee7c603ea50f9b79525b002723988f2ca2745f4562c145
MD5 e443d5f52b0e1b3cfdf0fd6bc8001c41
BLAKE2b-256 1845ec252db56751a9b122f4cd4b1d7cb2d86e5fa9b768c42bc780262e9ea3fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page