Coloraide

Latest version: v4.0

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

Scan your dependencies

Page 14 of 18

0.1.0

First non-alpha prerelease. Notable changes from the last alpha listed below.

> **Breaking Changes**:
> There are some breaking changes if coming from the previous alpha releases. All sRGB cylindrical spaces' non-hue
> data ranges are no longer scaled to 0 - 100, but use 0 - 1. Hue ranges have not changed.

- **NEW**: By accepting HSL, HSV, and HWB as non-hue channels as 0-100, we do lose a little precision, so for 1.0, we
are switching to accepting and returning raw data values between 0 - 1. We've kept hue between 0 - 360 as it is easier
for users to deal with hues between 0 - 360. Doing this will also match the new color spaces Okhsl and Okhsv that
need to be kept at 0 - 1 to get better rounding.
- **NEW**: We do not currently restrict percentages anymore in `!css-color color()` functions. There is no hard rules
that we need to at this time and no currently specified spaces that do this in the CSS specification. This is relaxed
for now until some future time when it becomes clear we must.
- **NEW**: New `okhsl` and `okhsv` color space.
- **NEW**: All color channels now accept the `none` keyword to specify an undefined channel. They can also optionally
output CSS strings with the keyword.
- **NEW**: Interpolation will return an undefined channel if both colors have that channel set to undefined.
- **NEW**: Provide a way to dump a color object to a simple dictionary and have the `Color()` object accept that
dictionary to recreate the color object.
- **NEW**: Provide `cat16` chromatic adaptation.
- **NEW**: Add `normalize` method to force channel normalization (evaluation of channels and setting undefined as
appropriate).
- **NEW**: Interpolated and composited colors will normalize undefined channels when returning a color.
- **NEW**: Jzazbz now also has an alias for `az` and `bz` channels as `a` and `b` respectively.
- **FIX**: Fix an attribute "get" issue where attributes that were not present on the `Color()` object appeared to be
present when using `hasattr()`.
- **FIX**: More accurate Oklab matrix.

0.1.0a27

- **NEW**: Add new `register` and `deregister` method to allow adding new spaces, Delta E methods, or gamut mapping
methods.
- **NEW**: Rework Delta E and gamut mapping methods as static plugin classes.
- **NEW**: When `Color()` class is subclassed, ensure the subclass is using copies of the base class plugin mappings.
This is done with a special `metaclass`. This will prevent accidental appending and deleting of plugins on a subclass
that affects the base class.
- **NEW**: Add new API for getting `uv` and `xy` values.
- **NEW**: Add new API for getting the white point (as an XYZ value) for a specific color.
- **NEW**: Channel values are generally more terse for easy typing, but many channels that map to a more verbose name
(think `l` and `lightness`) will still recognize the more verbose alias. Others that didn't specifically use the
more verbose name (think `jz` which is also `lightness`) now have a more verbose alias.

0.1.0a26

- **NEW**: Use D65 and D50 white points as specified in CSS spec, but limited to 4 decimals as everyone else seems to
do. Other white points were also adjusted as outlined in CIE 2004 Colorimetry T.3 and T.8.
- **FIX**: When converting, ensure that `NaN`s are converted to normal numbers.

0.1.0a25

- **NEW**: Add `luv` and `lchuv` color space using a `D50` illuminant.
- **NEW**: Add `din99o` and `din99o-lch` color space using a `D65` illuminant and associated Delta E~99o~ distance
algorithm.
- **NEW**: Make it easier to add additional Delta E methods and gamut mapping methods to a custom `Color()` class.
- **NEW**: Add new Delta E~z~ algorithm (Jzazbz).
- **NEW**: Add new Delta E~hyab~ algorithm for any Lab-ish style color spaces.
- **NEW**: Expose `delta_e_<type>` methods dynamically depending on what Delta E methods are currently available.
- **FIX**: Consistent calculation of achromatic thresholds across all Lch-ish color spaces.

0.1.0a24

- **NEW**: `color()` function locks accepted to channels to the number of actual channels.
- **NEW**: All `color()` function implementations for color spaces that do not formally support such notation in the
current CSS spec now use the custom identifier notation `--name`. For instance, HSL, which does not support the
`color()` format in the CSS spec, is now specified via: `color(--hsl h s l / a)`.
- **NEW**: Channels that do not support percentages will no longer be accepted in the `color()` form. For instance,
according to the CSS spec, XYZ color space does not allow percentages in the `color()` format. ColorAide will no
longer allow such notation in order to conform to the spec. `color(--lab)` will still support percentages for `l` as
it did prior to removal from the spec. All other percentage only channels will also still be supported.
- **NEW**: Internal restructuring of some files and file locations.

0.1.0a23

- **FIX**: Faster precision adjustment.

Page 14 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.