Coloraide

Latest version: v4.2.1

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

Scan your dependencies

Page 12 of 19

0.13.0

- **NEW**: Add new `closest` method that takes a list of colors and returns the one that is closet to the calling color
object.
- **NEW**: CSS color syntax no longer allows for forgiving channels in `color()`. This means that when a channel other
than alpha is omitted, we will no longer treat them as undefined. Instead, the color will simply fail to parse.
Raw data channels also must specify all channels.
- **NEW**: Clamp lower bounds of chroma at the channel level.
- **NEW**: `coloraide.spaces.WHITES` is now a 2 deep dictionary containing both 2˚ and 10˚ observer variants of white
points.
- **NEW**: Color space plugins now specify `WHITE` as a tuple with the x and y chromaticity coordinates. This allows a
space to specify unknown white points if desired.
- **FIX**: Fix `longer` hue interpolation when `θ1 - θ2 = 0`. The spec is wrong in this case, and interpolation should
still occur the long way around instead of keeping hue constant.
- **FIX**: Reduce redundancy in some CSS parsing patterns.
- **FIX**: Minor performance improvements.
- **FIX**: Legacy `rgb()`, `rgba()`, `hsl()`, and `hsla()` comma separated forms in CSS do not support `none`, only the
new space separated forms do.
- **FIX**: Ensure `py.typed` is installed with package so that type annotations work properly.

0.12.0

- **NEW**: Add a gamut mapping variant that matches the CSS Color Level 4 spec.
- **FIX**: Fix precision rounding issue.

0.11.0

> **Warning:** _Breaking Changes_
>
> 1. Prior to 0.11.0, if you specified a cylindrical space directly, ColorAide would normalize undefined hues the same
> way that the conversion algorithm did. In the below case, saturation is zero, so the hue was declared undefined.
>
> py
> >>> Color('hsl(270 0% 50%)')
> color(--hsl none 0 0.5 / 1)
>
>
> We should not have been doing this, and it made some cases of interpolation a bit confusing. It is no longer
> done as the hues are in fact specified by the user, even if they are powerless in relation to contributing to
> the rendered color. When a cylindrical color is converted or if a user declares the channel as undefined with
> `none` or some other way, then the channel will be declared undefined, because in these cases, they truly are.
>
> py
> >>> Color('white').convert('hsl')
> color(--hsl none 0 1 / 1)

0.10.0

- **NEW**: Switch back to using CIELCH for gamut mapping (`lch-chroma`). There are still some edge cases that make
`oklch-chroma` less desirable.
- **FIX**: Fix an issue where when attempting to generate steps some ∆E distance apart, the maximum step range was not
respected and could result in large hangs.

0.10a19

- **FIX**: Ensure that subclassed `Color` objects are normalized when performing operations with more than one color to
prevent issues in case one subclassed object has overridden important functions.
- **FIX**: Spaces like `lab`, `lch`, etc., which specify certain channels as percent only should require the `color()`
format to only accept percentages for those channels and output those channels as percentages when converting to a
string.

0.10a18

- **NEW**: Refactor of internals.
- **NEW**: `interpolate` and `steps` can now accept multiple colors and will return an interpolation function that spans all
specified colors via the range of `[0..1]`.
- **NEW**: Better control over piecewise interpolation: setting stops, adjusting options per segment, etc.
- **NEW**: `compose` can now accept multiple colors and will return a result where all colors are layered on top of each
other.
- **NEW**: `new` method does not need to be a `classmethod`. Make it a normal method on the instance.
- **NEW**: Add Jzazbz and JzCzhz color spaces.
- **NEW**: Add D65 variants of CIELAB, CIELCH, and XYZ.
- **NEW**: Add ICtCp color space and Delta E ITP method.
- **FIX**: Actually make `mix` default to `lab` like `interpolate` and friends do.

Page 12 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.