Coloraide

Latest version: v4.2.1

Safety actively analyzes 707607 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 19

4.2.1

- **FIX**: Hex output should force gamut mapping even if it is requested to disable it as output will be invalid
otherwise.

4.2

- **NEW**: Provide new color spaces Okl<sub>r</sub>ab/OkL<sub>r</sub>Ch which use a modified lightness prediction.
- **NEW**: Add new matrix math functions that are specifically optimized for matrices and vectors of length 3 and
leverage it in all appropriate places for a performance boost.
- **NEW**: Combine logic of `algebra` optimized vectorize functions and deprecate unnecessary function.
- **NEW**: Some typing fixes and adjustments.

4.1.0

- **NEW**: The `powerless` parameter is deprecated in `average()` as it is required to be always on for proper polar
space averaging.
- **FIX**: Polar space averaging was not setting hues to undefined when colors are evenly distributed. This is
required as circular means cannot be found in these cases.
- **FIX**: When averaging within a polar space, if the result hue is determined to be undefined at the end of
averaging, the color will be treated as if achromatic, setting saturation/chroma as necessary. This is needed to
prevent serialization of achromatic colors to a non-achromatic color when undefined values are resolved.
- **FIX**: Fully transparent colors should only contribute alpha in color averaging, regardless of `premultiply`
setting. This prevents fully transparent color channels, which provide no meaningful data, from distorting averages.
- **FIX**: When averaging in a polar space, if a color is considered achromatic but does not have an undefined hue,
the hue will be treated as undefined. Essentially the `powerless` parameter is now always `True`. This ensures that
achromatic colors properly contribute to the average without distorting the hue.

4.0.1

- **FIX**: Fix issue with `continuous` interpolation (and any that are derived from it, e.g., cubic spline
interpolations) that can cause bad hue fixup calculations.
- **FIX**: Fix issue with `continuous` interpolation (and any that are derived from it, e.g., cubic spline
interpolations) that can cause premultiplication to be applied to a color twice.

4.0

- **NEW**: Officially support Python 3.13.
- **NEW**: Define HTML output representation for Jupyter via `_repr_html_`.
- **NEW**: `get()`, `coords()`, `alpha()`, `to_dict()` can now return channel values with a specified precision via
the new `precision` parameter. Per channel precision can be controlled if a list of precision is given.
- **NEW**: `to_string()` support for per channel precision was added and `precision` can now accept a list of
precision.
- **NEW**: Remove deprecated `model` parameter from `cam16` ∆E method. Space should be used instead.
- **NEW**: Remove deprecated `algebra.npow` function. `algebra.spow` should be used instead.
- **NEW**: New generic `minde-chroma` gamut mapping method that allows specifying any Lab-ish or LCh-ish space to
operate in. `oklch-chroma`, `lch-chroma`, and `hct-chroma` are now derived from `minde-chroma` and just default to
using the specified color space to provide backwards compatibility. `minde-chroma` defaults to using OkLCh by
default. `lch-chroma` is still ColorAide's default gamut mapping currently.
- **NEW**: All MINDE chroma reduction methods now skip distance checks if a JND of zero is specified. A JND of zero
essentially disables the MINDE behavior and will reduce chroma as close to the gamut boundary as possible faster
than it would previously.
- **NEW**: MINDE chroma reduction plugins now dynamically figures out lightness range instead of requiring it to be
specified as a class attribute.
- **NEW**: MINDE chroma reduction gamut mapping and ray trace gamut mapping now allow for specifying an `adaptive`
option which will bias the chroma reduction by the specified factor in a hue independent way relative to a midpoint
of L = 50%.
- **NEW**: Remove deprecated `lab` parameter from experimental `raytrace` gamut mapping method. Users should use
`pspace` instead to specify the perceptual space to use.
- **NEW**: Class method `layer()` added to replace `compose()` with a multi-color handling similar to other API
methods such as `interpolate()`, etc.
- **NEW**: `compose()` has been deprecated in favor of the new `layer()` method and will be removed at some future
time but is available to help with transition.
- **NEW**: Improve experimental `raytrace` gamut mapping approach when performed in certain perceptual spaces.
- **NEW**: The experimental `raytrace` gamut mapping method now uses OkLCh by default instead of CIELCh (D65). Results
may vary.
- **BREAK**: Pre-configured `oklch-raytrace` and `lch-raytrace` variants of the experimental `raytrace` gamut mapping
method have been removed to reduce included plugins. OkLCh is the default now and users can still specify CIELCh and
other perceptual spaces if desired via the `pspace` parameter. Additionally, documentation has been added so users
can easily recreate the aforementioned pre-configured methods themselves or their own desired variants.
- **BREAK**: MINDE chroma reductions plugin combines the `DE` and `DE_OPTIONS` class attributes under `DE_OPTIONS`.
Users who have a derived gamut mapping class must combined these two options under `DE_OPTIONS`.
- **BREAK**: MINDE chroma reduction plugin now specifies the perceptual space via the `PSPACE` attribute instead of
`SPACE`. Users who have a derived, personal gamut mapping plugin need to update the name accordingly.
- **BREAK**: MINDE chroma reduction plugins now specify the JND under the `JND` class attribute instead of `LIMIT`.
Users who have a derived, personal gamut mapping plugin need to update the name accordingly.
- **BREAK**: Interpolation plugin renamed the parameter `create` to `color_cls` which is a more descriptive and less
confusing name. If a user interpolation plugin is derived and overrides the `__init__` method, it should update to
use `color_cls` instead of `create`.
- **FIX**: HWB and HSV cannot normalize hue and saturation the same way as HSL when saturation is negative.
- **FIX**: Fix corner case in ZCAM that could throw a domain error.
- **FIX**: `Color.new()` was documented as a class method but was internally still an instance method. Ensure it is a
class method.

3.3.1

- **FIX**: Ray trace gamut mapping algorithm will better handle perceptual spaces like CAM16 and HCT which have
atypical achromatic responses. This prevents unexpected cutoff close to white.
- **FIX**: Fix some documentation examples regarding gamut mapping in HCT.

Page 1 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.