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 colorspaciousVerified import paths — ran on the pinned version, not inferred.
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.
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')`.
Replace calls like `colorspacious.CIELCh_from_CIELab(data)` with `colorspacious.cspace_convert(data, 'CIELab', 'CIELCh')`.
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`.
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)`.