Skip to main content

Library to parse and create CxF files.

Project description

A Python library for reading, manipulating, and writing Color Exchange Format (CxF) files.

About

Colour CxF provides tools for working with CxF files, which are XML-based files used for exchanging color information between different applications and devices. The library allows you to:

  • Read CxF files from strings or files

  • Access and manipulate color data in various formats (RGB, CIELab, spectral)

  • Create CxF objects programmatically

  • Write CxF objects to XML strings

Installation

Primary Dependencies

Colour - CxF requires some dependencies in order to run:

Pypi

Once the dependencies are satisfied, Colour - CxF can be installed from the Python Package Index by issuing this command in a shell:

pip install --user colour-cxf

The overall development dependencies are installed as follows:

pip install --user 'colour-cxf[development]'

UV

Using uv you can simply install Colour - CxF via:

uv add colour-cxf

Quick Start

import colour_cxf

# Reading from a string
xml_string = """<?xml version="1.0" encoding="UTF-8"?>
<cc:CxF xmlns:cc="http://colorexchangeformat.com/CxF3-core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <cc:FileInformation>
        <cc:Creator>Colour Developers</cc:Creator>
        <cc:Description>Simple CxF Example</cc:Description>
    </cc:FileInformation>
</cc:CxF>"""

# Parse the XML string
cxf = colour_cxf.read_cxf(xml_string.encode("utf-8"))

# Access file information
print(f"Creator: {cxf.file_information.creator}")
print(f"Description: {cxf.file_information.description}")

Documentation

For more detailed information and examples, see the tutorial.

License

Colour CxF is licensed under the BSD-3-Clause license.

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_cxf-0.1.1.tar.gz (171.9 kB view details)

Uploaded Source

Built Distribution

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

colour_cxf-0.1.1-py3-none-any.whl (108.6 kB view details)

Uploaded Python 3

File details

Details for the file colour_cxf-0.1.1.tar.gz.

File metadata

  • Download URL: colour_cxf-0.1.1.tar.gz
  • Upload date:
  • Size: 171.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for colour_cxf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bb413ad9b7d15a5d1105193bb821c0f07a3d4e8a045a58223610eedef67fe1e3
MD5 7aed137f448699694a5a13984db50c26
BLAKE2b-256 ff4c45892ef0d85e2837cd9e305727417ae9759fd105e9ba9c5550c59d4428d4

See more details on using hashes here.

File details

Details for the file colour_cxf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: colour_cxf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 108.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for colour_cxf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6ae6d9e5c31c41a6c623ed7b7ab1bfa1475523c002836b339978cce3afd5aa9
MD5 f5fe7fa47f10a90a1e709e66d837298c
BLAKE2b-256 13a3abfa7237c8a09ae584f235624f4d4c8d2f0c14a16953a1763c9e6e10f756

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