Coloraide

Latest version: v4.0

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

Scan your dependencies

Page 6 of 18

2.2.1

- **FIX**: Averaging of a channel set with only undefined values should return an undefined value.
- **FIX**: Averaging should be done in linear light by default for a sane default. Default is now `srgb-linear`.

2.2

- **NEW**: Add XYB color space.
- **ENHANCE**: More efficient averaging.
- **FIX**: Fix issue where if all colors have the same channel undefined that a divide by zero can occur.

2.1

- **NEW**: Add new color averaging method.
- **FIX**: Interpolation should not modify any input colors.

2.0.2

- **FIX**: Consistent normalization of HWB hue.
- **FIX**: Consistent normalization of color in harmony monochromatic.

2.0.1

- **FIX**: Incorrect result when interpolating from a cylindrical space to a rectangular space and using `out_space`.

2.0

- **BREAK**: `interpolate`, `steps`, `mix`, `filter`, `compose`, and `harmony` will no longer base the output color on
the first input color. Colors will be evaluated in the specified color space and be output in that space unless
`out_space` is used to specify a specific output color space. For migration, specify the desired `out_space` if the
working `space` does not match the desired output.

- **BREAK**: Achromatic and undefined color channel handling has been rewritten. Color space objects no longer utilize
the `normalize()` or `achromatic_hue()` method and instead now use a new `is_achromatic()` and `resolve_channel()`
methods.

- **NEW**: Expose the new `Color.is_achromatic()` method to tell if colors, even non-cylindrical colors, are achromatic
or reasonably close to achromatic.

- **NEW**: Color channel definitions can specify a non-zero default for an undefined channel. Use `resolve_channel()`
for more advanced handling.

- **NEW**: CAM16, CAM16 UCS, CAM16 SCD, CAM15 LCD, CAM16 JMh, HCT, Jzazbz, JzCzhz, and IPT all currently require a
dynamic approach to detect achromatic colors. Undefined LCh chroma and hue channels and Lab a and b channels can now
resolve to non-zero values when undefined for better achromatic interpolation.

- **NEW** (ACEScct) will now resolve undefined color channels (non-alpha) with a non-zero default that represents black
as zero is actually out of gamut for that space.

- **NEW**: `filter`, `compose`, and `harmony` all now support the `out_space` parameter.

- **NEW**: All `<space>ish` mixin classes now give access to normalized names and indexes as `names()` and `indexes()`
opposed to `<space>ish_names()` etc. Old methods are still available but are deprecated.

- **NEW**: All RGB, HSL, and HSV color spaces are now created with a respective `RGBish`, `HSLish`, and `HSVish` mixin
class.

- **NEW**: Separable blend modes will now be evaluated in whatever RGB-ish color space is provided.

- **NEW**: `compose` will throw an error if a non-RGB-ish color space is provided.

- **NEW**: `Color.normalize()` added a new `nans` parameter that when set to `False` will prevent achromatic hue
normalization and will just force all channels to be defined.

- **NEW**: `Color.coords()` and `Color.alpha()`, which used to be available during the alpha/beta period have been
re-added. `coords()` accesses just the color channels (no alpha channel) while `alpha()` gets the alpha channel.

- **NEW**: Coordinate access functions: `get()`, `set()`, `coords()`, and `alpha()` functions now have a `nans`
parameter that when set to `False` will ensure the component(s) is returned as a real number instead of NaN. Set
operations only apply this when passing the current value to a callback for relative modification.

- **NEW**: A `norm` parameter is now added to `convert` and `update`. When set to `False`, it will prevent achromatic
normalization of hues during conversion. If no conversion is needed, the color is returned as is.

- **NEW**: ColorAide used to gamut map colors such as HSL, HSV, and HWB when interpolating into those spaces. This is no
longer done. It is possible to gamut map wider gamuts with these color spaces, so it will be up to the user to apply
gamut mapping when it is determined they need it.

- **NEW**: `EXTENDED_RANGE` is no longer needed and is removed from current color space classes.

- **NEW**: Improved accuracy for Oklab, OkLCh, Okhsl, and Okhsv.

- **NEW**: New "continuous" interpolation method.

- **FIX**: Fix aliases in IPT and IgPgTg.

- **FIX**: Fix some conversion issues with CAM16 based color spaces that was caused due to bad achromatic handling.

Page 6 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.