deltae
Written in Python.
Requires Python 3.9 or greater
Currently has DeltaE1976, DeltaE94, DeltaE2000 with the others looking to be implemented in the future.
Based on the whitepaper by Gaurav Sharma, Wencheng Wu and Endul N. Dala from the University of Rochester NY
User Dependancies:
None
Dev Dependancies:
Pandas and xlrd for rebuilding the test dataset from CIEDE2000.xls (see tests/build_rochester_data.py)
Background
Uses the data set provided from: https://hajim.rochester.edu/ece/sites/gsharma/ciede2000/dataNprograms/CIEDE2000.xls to test against. (converted to JSON as tests/data/rochester_data.json - see tests/build_rochester_data.py)
Based on using Bruce Lindblooms (http://www.brucelindbloom.com/) DE2000 calcuation. Then updated with the maths from the Rochester white paper.
It seems as though Rochester uses a different calculation for hPrime, h1Prime, h2Prime and hBarPrime than Bruce. However the whole dataset does return the correct deltae2000 values for both formulas. Perhaps there are some combinations of lab values that would be different.
Installation
Pip:
pip install deltae
Example Usage:
import deltae
Takes CIELAB values as a deltae.Lab or a plain dict - example below:
Lab1 = deltae.Lab(L=50.00, a=2.6772, b=-79.7751)
Lab2 = {'L': 50.00, 'a': 0.00, 'b': -82.7485}
Get the DeltaE 1976 Formula of 2 Lab Values:
deltae.delta_e_1976(Lab1, Lab2)
Get the DeltaE 94 Formula of 2 Lab Values:
deltae.delta_e_94(Lab1, Lab2)
Lab1 is treated as the reference color and Lab2 as the sample - CIE94 is not
symmetric. Pass application='textiles' to use the textiles constants instead
of the default graphic arts ones.
Get the DeltaE 2000 Formula of 2 Lab Values:
deltae.delta_e_2000(Lab1, Lab2)
Development
This project uses uv for dependency management and packaging.
uv sync
uv run pytest
Releasing
# bump version in pyproject.toml, then:
uv build
uv publish --token <PYPI_TOKEN>
Metadata
Release files for deltae 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deltae-2.0.0.tar.gz | 4.9 kB | Without provenance | Details for deltae-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deltae-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for deltae-2.0.0-py3-none-any.whl |
Total release size: 10.6 kB
Release files / deltae-2.0.0.tar.gz
| Download URL | deltae-2.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4933fa31820a077930c8a1844a6c1ec1f2c30bdd5e36adf62096943d0bdbff5d
|
|
BLAKE2b-256 checksum How to use checksums |
35574cf593944700df30abd75c83774fb115b97857255f64157899f0e25d1cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / deltae-2.0.0-py3-none-any.whl
| Download URL | deltae-2.0.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7b342bc4e6865c79ebfaf658453e8bb8ab351a0c0286c10bf43bd1124d9b938
|
|
BLAKE2b-256 checksum How to use checksums |
1fc1e4ba8484724fc0fee5c0226740012e9adbaf9f6d8fac1f5d215e9a5b5192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for deltae 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.