Releases: facelessuser/coloraide
Releases · facelessuser/coloraide
4.0
4.0
- NEW: Officially support Python 3.13.
- NEW: Define HTML output representation for Jupyter via
_repr_html_
. - NEW:
get()
,coords()
,alpha()
,to_dict()
can now return channel values with a specified precision via
the newprecision
parameter. Per channel precision can be controlled if a list of precision is given. - NEW:
to_string()
support for per channel precision was added andprecision
can now accept a list of
precision. - NEW: Remove deprecated
model
parameter fromcam16
∆E method. Space should be used instead. - NEW: Remove deprecated
algebra.npow
function.algebra.spow
should be used instead. - NEW: New generic
minde-chroma
gamut mapping method that allows specifying any Lab-ish or LCh-ish space to
operate in.oklch-chroma
,lch-chroma
, andhct-chroma
are now derived fromminde-chroma
and just default to
using the specified color space to provide backwards compatibility.minde-chroma
defaults to using OkLCh by
default.lch-chroma
is still ColorAide's default gamut mapping currently. - NEW: All MINDE chroma reduction methods now skip distance checks if a JND of zero is specified. A JND of zero
essentially disables the MINDE behavior and will reduce chroma as close to the gamut boundary as possible faster
than it would previously. - NEW: MINDE chroma reduction plugins now dynamically figures out lightness range instead of requiring it to be
specified as a class attribute. - NEW: MINDE chroma reduction gamut mapping and ray trace gamut mapping now allow for specifying an
adaptive
option which will bias the chroma reduction by the specified factor in a hue independent way relative to a midpoint
of L = 50%. - NEW: Remove deprecated
lab
parameter from experimentalraytrace
gamut mapping method. Users should use
pspace
instead to specify the perceptual space to use. - NEW: Class method
layer()
added to replacecompose()
with a multi-color handling similar to other API
methods such asinterpolate()
, etc. - NEW:
compose()
has been deprecated in favor of the newlayer()
method and will be removed at some future
time but is available to help with transition. - NEW: Improve experimental
raytrace
gamut mapping approach when performed in certain perceptual spaces. - NEW: The experimental
raytrace
gamut mapping method now uses OkLCh by default instead of CIELCh (D65). Results
may vary. - BREAK: Pre-configured
oklch-raytrace
andlch-raytrace
variants of the experimentalraytrace
gamut mapping
method have been removed to reduce included plugins. OkLCh is the default now and users can still specify CIELCh and
other perceptual spaces if desired via thepspace
parameter. Additionally, documentation has been added so users
can easily recreate the aforementioned pre-configured methods themselves or their own desired variants. - BREAK: MINDE chroma reductions plugin combines the
DE
andDE_OPTIONS
class attributes underDE_OPTIONS
.
Users who have a derived gamut mapping class must combined these two options underDE_OPTIONS
. - BREAK: MINDE chroma reduction plugin now specifies the perceptual space via the
PSPACE
attribute instead of
SPACE
. Users who have a derived, personal gamut mapping plugin need to update the name accordingly. - BREAK: MINDE chroma reduction plugins now specify the JND under the
JND
class attribute instead ofLIMIT
.
Users who have a derived, personal gamut mapping plugin need to update the name accordingly. - BREAK: Interpolation plugin renamed the parameter
create
tocolor_cls
which is a more descriptive and less
confusing name. If a user interpolation plugin is derived and overrides the__init__
method, it should update to
usecolor_cls
instead ofcreate
. - FIX: HWB and HSV cannot normalize hue and saturation the same way as HSL when saturation is negative.
- FIX: Fix corner case in ZCAM that could throw a domain error.
- FIX:
Color.new()
was documented as a class method but was internally still an instance method. Ensure it is a
class method.
3.3.1
3.3.1
- FIX: Ray trace gamut mapping algorithm will better handle perceptual spaces like CAM16 and HCT which have
atypical achromatic responses. This prevents unexpected cutoff close to white. - FIX: Fix some documentation examples regarding gamut mapping in HCT.
3.3
3.3
- NEW: Extend the
Cylindrical
mixin class to exposeradial_name()
andradial_index()
on the color space to
return the default name or default index of the radial coordinate in polar color spaces. It also exposes
is_polar()
as a simple check to see if the space uses polar coordinates. - NEW: Euclidean distance algorithm will now handle cylindrical color spaces by converting the polar coordinates
to rectangular coordinates in order to return sensible results. - NEW: Allow specifying number of colors to return for monochromatic harmony. When fewer are specified, allow them
to be spaced further apart for better contrast. - FIX: Handle unexpected undefined values in Euclidean distance.
3.2
3.2
- NEW: Add
zcam-jmh
color model. - NEW: Previously, color spaces such as
cam16-jmh
,cam16-ucs
,jzczhz
, etc. would handle achromatic values
absolutely, based on XYZ with the specified white point which could result in values with non-zero chroma. Now they
will be handled relative to the space, meaning colors will be considered achromatic when they are close to zero
chroma. What is considered achromatic is affected by the adapting luminance and other environmental settings.
This simplifies logic making it faster and also easier for users to subclass with their own environmental settings. - NEW: Normalize how color spaces with special viewing conditions are configured. Document configuring viewing
conditions of color models where applicable. - NEW: Add new
space
parameter incam16
∆E method to replace the now deprecatemodel
parameter.space
is
more flexible as users can now create CAM16 UCS spaces with different lighting environments and specify them
instead. - NEW: Remove previously deprecated CAM16 Jab implementation. Use
cam16-ucs
instead. - NEW: Interpolation will now gracefully handle a list of a single color causing the interpolation to just return
the single color. - NEW: More helpful interpolation errors will raise for an empty list.
- NEW: Generic ray trace gamut mapping now has a new
pspace
parameter that can be used to specify a perceptual
space in either LCh-ish or Lab-ish form.lch
parameter is now deprecated, but currently still present, but
pspace
will take priority if both are defined. - NEW: Rename
algebra.npow
toalgebra.spow
(signed power).algebra.npow
is now deprecated and will be
removed at some future time. - FIX: Don't force space to clamp negative XYZ when they are absolutizing them in some spaces.
- FIX: Ensure ST2084 EOTF implements the
max
step as specified in the spec.
3.1.2
3.1.2
- ENHANCE: Further improvements to both speed and accuracy of ray trace gamut mapping.
- FIX: Handle gamut mapping HDR spaces via ray trace more sanely.
3.1.1
3.1.1
- ENHANCE: Improved performance of ray tracing gamut mapping algorithm.
- FIX: Fix corner cases for detecting ray trace hits on gamut.
3.1
3.1
- NEW: Increase accuracy of the experimental ray tracing gamut mapping algorithm.
- NEW: Add generic gamut mapping algorithm that employs ray tracing method that can be used with any LCh
perceptual space. - NEW: Ray tracing gamut mapping algorithm parameter
traces
will no longer do anything as the approach no longer
has variable passes after new accuracy enhancements. - FIX: Jzazbz bug was fixed that would result in a divide by zero failure.
3.0.1
3.0.1
- FIX: Don't cache coercion of non-RGB space to RGB space in ray tracing gamut mapping algorithm as the underlying
color object could change underneath.
3.0
3.0
- BREAK: The CSS HDR spec now defines the polar spaces such as JzCzhz
color()
with hue channels that support
traditional hue syntax instead of percentages. Updated all polar spaces that are represented in thecolor()
format
to support this change. This is likely low impact as using percentages for hues is fairly uncommon. - BREAK: Remove previously deprecated functions:
algebra.apply
,algebra.no_nans
,algebra.no_nan
,
algebra.is_nan
,Labish.labish_names
,Labish.labish_indexes
,LChish.lchish_names
, and
LCHish.lchish_indexes
. These were mainly used internally, so breakage is likely low. - NEW:
jzazbz
,jzczhz
,ictcp
,rec2100-pq
, andrec2100-hlg
are now formally recognized, and by default
serialized, without the--
prefix as all the spaces are now part of the official HDR specification in CSS.
Previously, the spec was unofficial.--
prefixed names will still be recognized, but at some future time--
support will be removed for these spaces. Additionally, these spaces are now registered by default. - NEW: ∆E methods
z
anditp
are now registered by default as their associated color spaces are now registered
by default as well. - NEW: Color space channel flags
FLG_PERCENT
andFLG_OPT_PERCENT
are deprecated and no longer used. They are
still present, but will be removed in the future. - NEW: Update CSS percentage input/output ranges for
jzazbz
,jzczhz
, andictcp
to match the CSS HDR spec. - NEW: Ray tracing gamut mapping algorithms have been added:
oklch-raytrace
andlch-raytrace
. - NEW: RGB spaces now expose a
linear()
function on the underlying class to specify if they have a linear
equivalent. - NEW: Adjust inheritance order of RGB spaces. Previously, many inherited from
sRGB
, now they inherit from
sRGBLinear
. - NEW: Add
rec2100-linear
, essentially and alias forrec2020-linear
, that is specified in the CSS HDR
specification. - FIX: Ensure that when using discrete interpolation that spline based interpolations are truly discrete.
2.16
2.16
- NEW: Gamut mapping plugins now must accept a
space
parameter and the color will not already be in the desired
gamut color space. This change was specifically made in order to fix a bug with HCT gamut mapping. - FIX: Fix corner cases in HCT gamut mapping that would struggle with colors with high chroma and low lightness.