版本发布 8
## 8.5 - **NEW**: Add `preserve_luminance` option to `scale` to allow for a luminance preserving version. - **NEW**: Add `scale-luminance` gamut mapping method as a pre-configured luminance preserving scale method.
## 8.4 - **NEW**: Add a new gamut mapping approach called `scale` that scales colors within a linear RGB space and can preserve the dominant wavelength and takes luminance into account. - **NEW**: Utilize new `scale` gamut mapping logic for normalization when creating a color using `from_wavelengths()`, `blackbody()`, or `chromaticity()`. Options for `scale` can be passed down through these functions. - **NEW**: `chromaticity()` will now respect the input luminance when scaling/normalizing the color if luminance is provided. Max saturation can be forced with the `max_saturation` parameter if luminance would like to be ignored. - **NEW**: `from_wavelength()` now accepts the parameter `white` which will return the color relative to a white point different from what color it is placed into. - **NEW**: Creating colors from wavelength and determining wavelengths from colors are now only capped at the CMFs limit, though dominant wavelength calculations from colors are still only practical up until 700 nm even if the wavelengths above are not rejected. - **NEW**: Temperature plugin refactor such that `from_cct` only accepts Kelvin temperature and Duv and returns the chromaticity coordinates and the ID of either `xy-1931`, `uv-1960`, or `uv-1976`.
## 8.3 - **NEW**: Add the ability to convert a wavelength into a color. - **NEW**: Add a way to get the dominant or complementary wavelength from a color. - **NEW**: Refactor interpolation helpers and add Sprague interpolation. - **NEW**: Refactor handling of CMFs, and when interpolating them use Sprague interpolation. - **NEW**: Use Sprague interpolation for the Ohno 2013 spline implementation to reduce needed points. - **NEW**: Color interpolation can now have domains in reversed, sorted order. - **NEW**: Discard unused CMFs, other than CIE 1931 2˚ as there is no practical way to convert existing spaces to different observers. - **NEW**: Rename internal file.
## 8.2 - **NEW**: Add the ability to convert a wavelength into a color. - **NEW**: Add a way to get the dominant or complementary wavelength from a color. - **NEW**: Refactor interpolation helpers and add Sprague interpolation. - **NEW**: Refactor handling of CMFs, and when interpolating them use Sprague interpolation. - **NEW**: Use Sprague interpolation for the Ohno 2013 spline implementation to reduce needed points. - **NEW**: Color interpolation can now have domains in reversed, sorted order. - **NEW**: Discard unused CMFs, other than CIE 1931 2˚ as there is no practical way to convert existing spaces to different observers. - **NEW**: Rename internal file.
## 8.1 - **NEW**: Allow relative color manipulation using context manager function `within`. - **NEW**: Add new special gamut `macadam-limits` for evaluating a color within these limits via `in_gamut()` or clamping to these limits via `fit()`. - **NEW**: Add new special gamut `pointer-gamut` for evaluating a color within these limits via `in_gamut()` or clamping to these limits via `fit()`. `in_pointer_gamut()` and `fit_pointer_gamut()` are deprecated and will be removed at some future time. - **FIX**: Fix an internal issue related to Pointer Gamut calculations. - **FIX**: Ensure consistency with checks close to zero for various algorithms.
## 5.1 - **NEW**: Linear Display P3 is now serialized as the official CSS color name `color(display-p3-linear ...)` which matches recent spec updates. `color(--display-p3-linear ...)` is still accepted as an input, but ColorAide will not use this serialization on output, and support for the old name will be removed at some future time. - **NEW**: Deprecate the `fit` parameter in `convert()` and recommend just calling `color.convert(space).fit()` instead. - **FIX**: Improve IPT's LMS conversion matrix to perform better in 64 bit. - **FIX**: In the unlikely case that the ray trace gamut mapping never finds a gamut intersection during an iteration, ensure it falls back to the original color for clipping.
## 5.0 - **BREAKING**: CSS serialization no longer requires HSL and HWB to return percentage form during serialization when using the non-legacy (no comma) syntax. For consistency, HSL and HWB will only return the percentage form with non-legacy serialization when `percent` is set `True` by the user. The legacy format will still format strings with percentages. This matches all other color spaces in ColorAide that use modern CSS serialization syntax. If you rely on ColorAide serializing HSL in the non-legacy format with percentage output, simply add `percent=True` when calling `to_string()`. - **NEW**: `Channel` object's `limit` parameter can now accept a function to constrain a channel. This can allow for more complex boundary constraints, such as rounding the value in addition to channels with a hard boundary ranges. - **NEW**: CAM16, CAM02, HCT, ZCAM, and Hellwig will no longer force colors to black when lightness is zero except when chroma/saturation/colorfulness is also zero. This allows out of gamut colors with lightness of zero to properly be seen as out of gamut. - **NEW**: Add new `Luminant` mixin for color spaces which allows for internally targeting spaces that expose a lightness component. - **NEW**: Rename `Regular` space mixin as `Prism` for a more appropriate description. `Regular` is still available but deprecated. - **NEW**: UCS, xyY, and Lab-like spaces are now considered `Prism` and `Luminant` spaces. - **NEW**: Spaces can now declare if they are "subtractive" via a `SUBTRACTIVE` class attribute. - **NEW**: Every space now exposes a `linear()`, `indexes()`, and `names()` method opposed to just a select few. - **NEW**: `raytrace` gamut mapping will now successfully operate on `Prism` color spaces (formerly `Regular`) as well as `RGBish`. `Prism` spaces which are also `Luminant` are not handled. - **NEW**: Harmonies now better handle irregular `Prism` spaces. - **NEW**: CMYK now uses CMY as the base conversion space and ensures round trip with wide gamut colors. - **FIX**: Analogous and split complementary harmony results ordered in a more logical configuration. - **FIX**: Fix an issue with some HDR spaces in ray trace gamut mapping. - **FIX**: Fix Duv sign flips and poor precision near inflection points in the Robertson 1968 CCT curve. - **FIX**: Fix an issue where a custom range of mired points for the Robertson 1968 CCT curve can fall exactly where slopes change direction, causing a divide by zero. Catch this case and skip any point that falls in this region.
## 4.7.2 - **ENHANCE**: Improve performance of color harmony generation. - **ENHANCE**: Improve performance of gamut mapping using the `raytrace` approach when a color must be coerced to an RGB space. - **FIX**: When a `Color` instance is passed as an input to the `Color` constructor, use a more reliable check to ensure the color instance is of a compatible color space. - **FIX**: Fix regression that caused `longer` hue interpolation to no longer work with `discrete` interpolation.