colorspacious
Colorspacious is a powerful, accurate, and easy-to-use library for performing colorspace conversions.
In addition to the most common standard colorspaces (sRGB, XYZ, xyY, CIELab, CIELCh), we also include: color vision deficiency (“color blindness”) simulations using the approach of Machado et al (2009); a complete implementation of CIECAM02; and the perceptually uniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al (2006).
To get started, simply write:
from colorspacious import cspace_convert Jp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS")
This converts an sRGB value (represented as integers between 0-255) to CAM02-UCS J’a’b’ coordinates (assuming standard sRGB viewing conditions by default). This requires passing through 4 intermediate colorspaces; cspace_convert automatically finds the optimal route and applies all conversions in sequence:
This function also of course accepts arbitrary NumPy arrays, so converting a whole image is just as easy as converting a single value.
- Documentation:
- Installation:
pip install colorspacious
- Downloads:
- Code and bug tracker:
- Contact:
Nathaniel J. Smith <njs@pobox.com>
- Dependencies:
Python 2.6+, or 3.3+
NumPy
- Developer dependencies (only needed for hacking on source):
nose: needed to run tests
- License:
MIT, see LICENSE.txt for details.
- References for algorithms we implement:
Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on CIECAM02 colour appearance model. Color Research & Application, 31(4), 320–330. doi:10.1002/col.20227
Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A physiologically-based model for simulation of color vision deficiency. Visualization and Computer Graphics, IEEE Transactions on, 15(6), 1291–1298. http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html
Other Python packages with similar functionality that you might want to check out as well or instead:
colour: http://colour-science.org/
colormath: http://python-colormath.readthedocs.org/
ciecam02: https://pypi.python.org/pypi/ciecam02/
Metadata
Release files for colorspacious 1.1.2
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 | |
|---|---|---|---|---|
| colorspacious-1.1.2.tar.gz | 688.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| colorspacious-1.1.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 726.3 kB
Release files / colorspacious-1.1.2.tar.gz
| Download URL | colorspacious-1.1.2.tar.gz |
|---|---|
| Size | 688.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e9072e8cdca889dac445c35c9362a22ccf758e97b00b79ff0d5a7ba3e11b618
|
|
BLAKE2b-256 checksum How to use checksums |
75e4aa41ae14c5c061205715006c8834496d86ec7500f1edda5981f0f0190cc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / colorspacious-1.1.2-py2.py3-none-any.whl
| Download URL | colorspacious-1.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 37.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c78befa603cea5dccb332464e7dd29e96469eebf6cd5133029153d1e69e3fd6f
|
|
BLAKE2b-256 checksum How to use checksums |
aba1318b9aeca7b9856410ededa4f52d6f82174d1a41e64bdd70d951e532675a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for colorspacious 1.1.2
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.