Releases: linebender/color
v0.3.2
This release has an MSRV of 1.82.
Added
-
Add
interpolate_unpremultipliedandgradient_unpremultipliedfor interpolating in unpremultiplied (straight) alpha space.While such interpolation will often give perceptually undesired results, this allows using Color to implement rendering features where such interpolation is specified, like in the HTML Canvas element. (#185 by @sagudev)
Changed
- Specify XYZ-D65 color space conversion matrices as exact rationals. (#171 by @tomcur)
- Improve documentation of
AlphaColorvsPremulColorto clarify alpha premultiplication, and make both types more discoverable from each other. (#190 by @tomcur)
New Contributors
- @ProgramCrafter made their first contribution in #186
- @sagudev made their first contribution in #191
Full Changelog: v0.3.1...v0.3.2
v0.3.1
This release has an MSRV of 1.82.
Fixed
- Compilation failure with nightly Rust due to
core_float_mathchanges. (#175 by @ajakubowicz-canva)
New Contributors
- @ajakubowicz-canva made their first contribution in #175
Full Changelog: v0.3.0...v0.3.1
v0.2.4
This release has an MSRV of 1.82.
Fixed
- Compilation failure with nightly Rust due to
core_float_mathchanges. (#175 by @ajakubowicz-canva)
New Contributors
- @ajakubowicz-canva made their first contribution in #175
Full Changelog: v0.2.3...v0.2.4
v0.3.0
This release has an MSRV of 1.82.
Added
-
Support converting between color spaces without chromatic adaptation, thereby representing the same absolute color in the destination color space as in the source color space. (#139, #153 by @tomcur)
- Add absolute color conversion matrices for ProPhoto RGB, ACES2065-1 and ACEScg for faster conversion without chromatic adaptation to and from these color spaces. (#156, #164, #165 by @tomcur)
Note to
ColorSpaceimplementers: theWHITE_POINTassociated constant is added toColorSpace, defaulting to D65.
Implementations with a non-D65 white point should set this constant to get correct default absolute conversion behavior. -
Support manual chromatic adaptation of colors between arbitrary white point chromaticities. (#139 by @tomcur)
-
Add
Missing::EMPTYto allow getting an emptyMissingset inconstcontexts. (#149 by @tomcur) -
Add
From<AlphaColor<_>> for DynamicColorconversions for all color spaces that have a direct runtime representation inColorSpaceTag. (#155 by @LaurenzV) -
Add usage examples for
DynamicColor::interpolateandgradient. (#158, #159 by @tomcur)
Changed
- Breaking change: the deprecated conversion
From<Rgba8> for PremulColor<Srgb>has been removed. UseFrom<PremulRgba8> for PremulColor<Srgb>instead. (#157 by @tomcur) - Improve
no_stdsupport. (#146 by @waywardmonkeys) - Make
{AlphaColor, OpaqueColor, PremulColor}::to_rgba8faster. (#166 by @tomcur)
Fixed
- Correctly determine analogous components between ACES2065-1 and other color spaces when converting,
to carry missing components forward when interpolating colors with missing components in the ACES 2065-1 colorspace. (#144 by @tomcur) - Fixed powerless hue component calculation for the HWB color space. (#145 by @tomcur)
Full Changelog: v0.2.3...v0.3.0
v0.2.3
This release has an MSRV of 1.82.
Added
- Support for the ACES2065-1 color space. (#124 by @tomcur)
- A documentation example implementing
ColorSpace. (#130 by @tomcur) - Conversions of
[u8; 4]and packedu32intoRgba8andPremulRgba8are now provided. (#135 by @tomcur) - Support construction of
AlphaColor<Srgb>,OpaqueColor<Srgb>andPremulColor<Srgb>from rgb8 values. (#136 by @waywardmonkeys)
Fixed
Full Changelog: v0.2.2...v0.2.3
v0.2.2
This release has an MSRV of 1.82.
Fixed
- Colors in
XyzD65are serialized asxyz-d65rather thanxyz. (#118 by @waywardmonkeys) - Alpha values are clamped at parse time. (#119 by @waywardmonkeys)
Full Changelog: v0.2.1...v0.2.2
v0.2.1
This release has an MSRV of 1.82.
Added
- Add
FromStrimpl forAlphaColor,DynamicColor,OpaqueColor,PremulColor. (#111 by @waywardmonkeys)
Changed
- Don't enable
serde'sstdfeature when enabling ourstdfeature. (#108 by @waywardmonkeys) From<Rgba8>forPremulColoris deprecated and replaced byFrom<PremulRgba8>. (#113 by @waywardmonkeys)
Fixed
- Make color parsing case insensitive. (#109 by @raphlinus)
Full Changelog: v0.2.0...v0.2.1
v0.2.0
This release has an MSRV of 1.82.
Added
- Add
BLACK,WHITE, andTRANSPARENTconstants to the color types. (#64 by @waywardmonkeys) - The
serdefeature enables usingserdewithAlphaColor,DynamicColor,HueDirection,OpaqueColor,PremulColor, andRgba8. (#61, #70, #80 by @waywardmonkeys) - Conversion of a
Rgba8to au32is now provided. (#66, #77 by @waywardmonkeys, #100 by @tomcur) - A new
PremulRgba8type mirrorsRgba8, but forPremulColor. (#66 by @waywardmonkeys) AlphaColor::with_alphaallows setting the alpha channel. (#67 by @waywardmonkeys)- Support for the
ACEScgcolor space. (#54 by @MightyBurger) DynamicColorgetswith_alphaandmultiply_alpha. (#71 by @waywardmonkeys)DynamicColornow implsPartialEq. (#75 by @waywardmonkeys)AlphaColor,OpaqueColor, andPremulColornow implPartialEq. (#76, #86 by @waywardmonkeys)HueDirectionnow implsPartialEq. (#79 by @waywardmonkeys)ColorSpaceTagandHueDirectionnow have bytemuck support. (#81 by @waywardmonkeys)- A
DynamicColorparsed from a named color or named color space function now serializes back to that name, as per the CSS Color Level 4 spec (#39 by @tomcur). CacheKeyto allow using colors as keys for resource caching. (#92 by @DJMcNab)
Changed
- The
mul_alphamethod was renamed tomultiply_alpha. (#65 by @waywardmonkeys)
Fixed
- Stray parenthesis in hex serialization of
Rgba8fixed. (#78 by @raphlinus)
New Contributors
- @MightyBurger made their first contribution in #54
- @nicoburns made their first contribution in #97
Full Changelog: v0.1.0...v0.2.0
Color 0.1.0
We are proud to announce that we have released v0.1.0 of Color!
The Color library provides functionality for representing, converting, parsing, serializing, and manipulating colors in a variety of color spaces. It closely follows the CSS Color Level 4 draft spec.