Registry / serialization / colorspacious

colorspacious

JSON →
library1.1.2pypypiunverified

Colorspacious is a Python library providing robust and accurate tools for colorspace conversions. It supports a wide range of standard colorspaces (sRGB, CIELab, CIELCh, etc.) and is built to handle numerical data efficiently, especially with NumPy arrays. The current version is 1.1.2, but development has been inactive since 2018, placing it in an abandoned state.

pip install colorspacious
INSTALL
IMPORT
SIG · COLORSPACIOUS
C
colorspacious
serializationpythonv1.1.2
Install
3.6s avg
Import
282ms
Disk
89MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.275s · 89.6MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.6s · import 0.288s · 86MB
89MB installed
● package 89MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cspace_convert
import colorspacious as cs cs.cspace_convert(...)
CIELCh_from_CIELab
import colorspacious as cs cs.cspace_convert(data, 'CIELab', 'CIELCh')
from colorspacious import CIELCh_from_CIELab
Direct conversion functions like CIELCh_from_CIELab were removed in v1.0.0. Use cspace_convert instead.

This example demonstrates basic color space conversion using the `cspace_convert` function. It takes a NumPy array representing color data and converts it between specified input and output color spaces.

import colorspacious as cs import numpy as np # A color in sRGB255 (standard 0-255 sRGB) space sRGB_color = np.array([255, 128, 0]) # Orange # Convert to CIELab (D65 illuminant) space LAB_color = cs.cspace_convert(sRGB_color, "sRGB255", "CIELab") print(f"sRGB color (255, 128, 0) in CIELab: {LAB_color}") # Convert to CIELCh space LCH_color = cs.cspace_convert(LAB_color, "CIELab", "CIELCh") print(f"sRGB color (255, 128, 0) in CIELCh: {LCH_color}")
Debug
Known issues
breakingThe argument signature for `colorspacious.cspace_convert` changed significantly in version 1.0.0. Previously, it might have been `cspace_convert(data, start_cspace, target_cspace)`. In v1.0.0 and later, it uses explicit keyword arguments `in_cspace` and `out_cspace`.
fix
Update calls to `cspace_convert` from `cs.cspace_convert(data, 'old_in', 'old_out')` to `cs.cspace_convert(data, in_cspace='new_in', out_cspace='new_out')` or `cs.cspace_convert(data, 'new_in', 'new_out')`.
affects: >=1.0.0
breakingDirect utility functions for specific conversions (e.g., `CIELCh_from_CIELab`, `XYZ_from_sRGB1`) were removed in version 1.0.0. All conversions are now consolidated under the general `colorspacious.cspace_convert` function.
fix
Replace calls like `colorspacious.CIELCh_from_CIELab(data)` with `colorspacious.cspace_convert(data, 'CIELab', 'CIELCh')`.
affects: >=1.0.0
breakingMany colorspace specifier strings changed naming conventions in version 1.0.0 (e.g., `sRGB_linear` became `sRGB1`, `sRGB_255` became `sRGB255`). Using old names will result in `ValueError`.
fix
Refer to the `colorspacious` documentation for the updated list of colorspace names. For common cases, update `sRGB_linear` to `sRGB1` and `sRGB_255` to `sRGB255`.
affects: >=1.0.0
gotchaWhile `colorspacious` can process lists or tuples as input, it is heavily optimized for NumPy arrays. Using non-NumPy inputs, especially for large datasets, can lead to significant performance degradation.
fix
Ensure that your color data is converted to a NumPy array before passing it to `colorspacious` functions, e.g., `np.array(my_list_of_colors)`.
affects: All
Upgrade
Version history
1.1.2latest on PyPI · released Apr 8, 2018
Audit
Dependencies
numpyrequiredRequired for core numerical operations and efficient array processing.
Agent activity
13 hits · last 30 days
node
11
OpenAI (training)
1
Resources
colorspacious — pip install colorspacious · libregistry