Coloraide

Latest version: v4.0

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

Scan your dependencies

Page 8 of 18

1.6

- **NEW**: Add `rec2100-hlg` color space.
- **BREAKING**: `rec2100pq` should have been named `rec2100-pq` for consistency. It has been renamed to `rec2100-pq` and
serializes with the CSS ID of `--rec2100-pq`. This is likely to have little impact on most users.

1.5

- **NEW**: Formally add support for Python 3.11.
- **NEW**: Add support for custom domains when interpolating.
- **NEW**: `set()` can now take a dictionary of channels and values and set multiple channels at once.
- **NEW**: `get()` can now take a list of channels and will return a list of those channel values.
- **ENHANCE**: Simplify some type annotation syntax.
- **ENHANCE**: Some minor performance enhancements.
- **FIX**: Fix OkLCh CSS parsing.

1.4

- **NEW**: A color space can now declare its dynamic range. By default, spaces are assumed to be SDR, but can declare
themselves as HDR, or something else. This allows ColorAide to make decisions based on a color's dynamic range.
- **NEW**: Add channel aliases for IPT and IPT-like color spaces (IgPgTg and ICtCp): `intensity`, `protan`, and
`tritan`.
- **FIX**: The ICtCp and oRGB space would return the Lab-ish equivalents for `a` and `b` in reverse order if calling
`Labish.labish_names`. This was not actually called anywhere in the code, but is now fixed for any future cases that
may require calling it.
- **FIX**: Undefined channels should be ignored when clipping a color.
- **FIX**: Do not apply SDR shortcuts in gamut mapping when fitting in a non-SDR color gamut, such as HDR.

1.3

- **ENHANCE**: Color vision deficiency filters can now be instantiated with different default methods for severe and
anomalous cases.
- **FIX**: Fix premultiplication handling when using `compose`.

1.2

- **NEW**: Add new monotone interpolation method.
- **ENHANCE**: Better extrapolation past end of spline.
- **FIX**: Small speed up in natural spline calculation.
- **FIX**: Fix import that should have been relative, not absolute.

1.1

- **NEW**: Slight refactor of interpolation plugin so that common code does not need to be duplicated, and the
`interpolate` method no longer needs to accept an `easing` parameter as the plugin class exposes a new `ease` method
to automatically acquire the proper, specified easing function and apply it.
- **NEW**: Functions built upon interpolation can now use a new `extrapolate` parameter to enable extrapolation if
interpolation inputs exceed 0 - 1. `point` will be passed to `Interpolator.interpolate` un-clamped if `extrapolate` is
enabled. If a particular interpolation plugin needs to do additional work to handle extrapolation, they can check
`self.extrapolate` to know whether extrapolation is enabled.
- **NEW**: Implement and provide the following easing functions as described in the CSS Easing Level 1 spec:
`cubic_bezier`, `ease`, `ease_in`, `ease_out`, and `ease_in_out`. Also provide a simple `linear` easing function.
- **New**: Add `natural` and `catrom` cubic spline options for interpolation. The `catrom` (Catmull-Rom) spline requires
the plugin to be registered in order to use it.
- **FIX**: Due to floating point math, B-spline could sometimes return an interpolation of fully opaque colors with an
imperceptible amount of transparency. If alpha is very close (`!py3 1e-6`) to being opaque, just round it to opaque.
- **FIX**: An easing function's output should not be clamped, only the input, and that only **needs** to occur on the
the outer range of an entire interpolation.

Page 8 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.