Coloraide

Latest version: v4.0

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

Scan your dependencies

Page 13 of 18

0.6.0

- **NEW**: Update spaces such that they provide a single conversion point which simplifies color space API and
centralizes all conversion logic allowing us to pull chromatic adaptation out of spaces.
- **NEW**: `color()` output format never uses percent when serializing, but will optionally accept percent as input.
- **NEW**: Slight refactor of color space, delta E, and gamut mapping plugins. All now specify there name via the
property `NAME` instead of methods `space()` for color spaces and `name()` for other plugins.
- **NEW**: Restructure source structure by flattening out some directories and better organizing source files. This
changes some import paths.
- **NEW**: Color spaces do not specify `alpha` in `CHANNEL_NAMES` as the `alpha` name cannot be changed.
- **NEW**: Color space objects do not need a constant to track number of color channels.

0.5

>
>
> If you are working directly in a cylindrical color space and ever wish to force the normalization of color hues
> as undefined when the color meets the usual requirements as specified by the color space's current rules, just
> call `normalize` on the color and it will apply the same logic that occurs during the conversion process.
>
> py
> >>> Color('hsl(270 0% 50%)').normalize()
> color(--hsl none 0 0.5 / 1)
>
> 2. If you relied on commas in CSS forms that did not support them, this behavior is no longer allowed. It was
> thought that CSS may consider allowing comma formats in formats like `hwb()`, etc., and it was considered, but
> ultimately the decision was to avoid adding such support. We've updated our input and output support to reflect
> this. Color spaces can always be subclassed and have this support added back, if desired, but will not be shipped
> as the default anymore.
> 3. The D65 form of Luv and LCHuv is now the only supported Luv based color spaces by default now. D50 Luv and LCHuv
> have been dropped and `luv` and `lchuv` now refers to the D65 version. In most places, the D65 is the most common
> used white space as most monitors are calibrated for this white point. The only reason CIELAB and CIELCH are D50
> by default is that CSS requires it. Anyone interested in using Luv with a different white point can easily
> subclass the current Luv and create a new plugin color space that uses the new white point.
> 4. Renamed DIN99o Lch identifier to the short name of `lch99o`.>

- **NEW**: ColorAide now only ships with the D65 version Luv and LCHuv as D65, in most places is the expected white
space. Now, the identifier `luv` and `lchuv` will refer to the D65 version of the respective color spaces. D50
variants are no longer available by default.
- **NEW**: Add the HSLuv color space.
- **NEW**: DIN99o Lch identifier was renamed from `din99o-lch` to `lch99o`. To use in CSS `color()` form, use
`--lch99o`.
- **NEW**: Refactor chroma reduction/MINDE logic to cut processing time in half. Gamut mapping results remain very
similar.
- **NEW**: Be more strict with CSS inputs and outputs. `hwb()`, `lab()`, `lch()`, `oklab()`, and `oklch()` no longer
support comma string formats.
- **NEW**: Officially drop Python 3.6 support.
- **FIX**: Do not assume user defined, powerless hues as undefined. If they are defined by the user, they should be
respected, even if they have no effect on the current color. This helps to ensure interpolations acts in an
unsurprising way. If a user manually specifies the channel with `none`, then it will be considered undefined, or if
the color goes through a conversion to a space that cannot pick an appropriate hue, they will also be undefined.

0.5.0

- **NEW**: Add type annotations and refactor code to better accommodate the type annotations. Public API not really
affected, but a bit of the internals have changed.
- **FIX**: Fix issue where `compose`, if `backdrop` list is empty, would not respect `in_place` option.

0.4.0

- **NEW**: Officially support Python 3.10.
- **NEW**: Slightly more accurate Oklab matrix calculation.
- **NEW**: Exported dictionary form can now be used as a normal color input in functions like `contrast`, `interpolate`,
etc.
- **NEW**: Color objects will accept a dictionary mapping when `alpha` is not specified. When this occurs, `alpha` is
assumed to be `1`.
- **FIX**: Fix an object compare issue.

0.3.0

> **Breaking Change**
> XYZ changes below will cause breakage as `xyz` now refers to XYZ with D65 instead of D50. Also, CSS identifiers
> changed per the recent specification change.

- **NEW**: When calling `dir()` on `Color()`, ensure dynamic methods are in the list.
- **NEW**: `xyz` now refers to XYZ D65. CSS `color()` function now specifies D65 color as either
`color(xyz x y z)` or `color(xyz-d65 x y z)`. XYZ D50 is now specified as
` color(xyz-D50 x y z)`.
- **NEW**: Add CIELUV and CIELCH~uv~ D65 variants.

0.2.0

- **NEW**: Provide dedicated `clip` method. `clip` is still a specifiable method under the `fit` function. It is also a reserved name under `fit` and cannot be overridden via plugins or be removed.
- **NEW**: Add more conversion shortcuts to OK family of color spaces.
- **FIX**: Fix an issue where the shorter conversion path wasn't always taken as convert couldn't find to/from methods if the color space name had `-` in it.

Page 13 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.