PackageTrack
Sign in Get early access

color

A library for representing and manipulating colors

0.3.3 4.3M downloads/mo #4841 most downloaded on crates.io linebender/color

What this package is like to depend on

Last release 3 months ago

05 May 2026

Ships unpredictably

gaps range from 1 weeks to 10.0 years

Nearly every release is documented

notes for 10 of 11 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

11 releases · first in 2014

2 releases in the last 12 months

see the full history below

Release timeline

11 releases · Nov 2014 to May 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 11
  1. 0.3.3 05 May 2026
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Changed

    • Skip serializing/deserializing PhantomData marker fields of OpaqueColor, AlphaColor, and PremulColor when the serde feature is enabled. (#202 by @alvinisspicy)

      This is technically a breaking change: data serialized with 0.3.2 or earlier will now fail to deserialize.
      We expect this to not be an issue in practice; if you do hit this issue, please let us know and we will re-evaluate.

    • Oklch::WHITE_COMPONENTS's hue is now 0° instead of 90°. (#210 by @tomcur)

    • Mapping functions like OpaqueColor::map now take FnOnce instead of Fn. (#211 by @tomcur)

    New Contributors

    Full Changelog: v0.3.2...v0.3.3

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Changed

    • Skip serializing/deserializing PhantomData marker fields of OpaqueColor, AlphaColor, and PremulColor when the serde feature is enabled. ([#202][] by [@alvinisspicy][])

      This is technically a breaking change: data serialized with 0.3.2 or earlier will now fail to deserialize. We expect this to not be an issue in practice; if you do hit this issue, please let us know and we will re-evaluate.

    • Oklch::WHITE_COMPONENTS's hue is now 0° instead of 90°. ([#210][] by [@tomcur][])

    • Mapping functions like OpaqueColor::map now take FnOnce instead of Fn. ([#211][] by [@tomcur][])

    Open source →
  2. 0.3.2 10 Sep 2025
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Added

    • Add interpolate_unpremultiplied and gradient_unpremultiplied for 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 AlphaColor vs PremulColor to clarify alpha premultiplication, and make both types more discoverable from each other. (#190 by @tomcur)

    New Contributors

    Full Changelog: v0.3.1...v0.3.2

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Added

    • Add interpolate_unpremultiplied and gradient_unpremultiplied for 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 AlphaColor vs PremulColor to clarify alpha premultiplication, and make both types more discoverable from each other. ([#190][] by [@tomcur][])
    Open source →
  3. 0.3.1 19 May 2025
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Fixed

    New Contributors

    Full Changelog: v0.3.0...v0.3.1

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Fixed

    • Compilation failure with nightly Rust due to core_float_math changes. ([#175][] by [@ajakubowicz-canva][])
    Open source →
  4. 0.3.0 30 Apr 2025
    Release notes

    Crates.io | Docs

    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 ColorSpace implementers: the WHITE_POINT associated constant is added to ColorSpace, 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::EMPTY to allow getting an empty Missing set in const contexts. (#149 by @tomcur)

    • Add From<AlphaColor<_>> for DynamicColor conversions for all color spaces that have a direct runtime representation in ColorSpaceTag. (#155 by @LaurenzV)

    • Add usage examples for DynamicColor::interpolate and gradient. (#158, #159 by @tomcur)

    Changed

    • Breaking change: the deprecated conversion From<Rgba8> for PremulColor<Srgb> has been removed. Use From<PremulRgba8> for PremulColor<Srgb> instead. (#157 by @tomcur)
    • Improve no_std support. (#146 by @waywardmonkeys)
    • Make {AlphaColor, OpaqueColor, PremulColor}::to_rgba8 faster. (#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

    Open source →
    Release notes

    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 ColorSpace implementers: the WHITE_POINT associated constant is added to ColorSpace, 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::EMPTY to allow getting an empty Missing set in const contexts. ([#149][] by [@tomcur][])

    • Add From<AlphaColor<_>> for DynamicColor conversions for all color spaces that have a direct runtime representation in ColorSpaceTag. ([#155][] by [@LaurenzV][])

    • Add usage examples for DynamicColor::interpolate and gradient. ([#158][], [#159][] by [@tomcur][])

    Changed

    • Breaking change: the deprecated conversion From<Rgba8> for PremulColor<Srgb> has been removed. Use From<PremulRgba8> for PremulColor<Srgb> instead. ([#157][] by [@tomcur][])
    • Improve no_std support. ([#146][] by [@waywardmonkeys][])
    • Make {AlphaColor, OpaqueColor, PremulColor}::to_rgba8 faster. ([#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][])
    Open source →
  5. 0.2.4 19 May 2025
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Fixed

    New Contributors

    Full Changelog: v0.2.3...v0.2.4

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Fixed

    • Compilation failure with nightly Rust due to core_float_math changes. ([#175][] by [@ajakubowicz-canva][])
    Open source →
  6. 0.2.3 20 Jan 2025
    Release notes

    Crates.io | Docs

    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 packed u32 into Rgba8 and PremulRgba8 are now provided. (#135 by @tomcur)
    • Support construction of AlphaColor<Srgb>, OpaqueColor<Srgb> and PremulColor<Srgb> from rgb8 values. (#136 by @waywardmonkeys)

    Fixed

    • Specify some ColorSpace::WHITE_COMPONENTS to higher precision. (#128, #129 by @tomcur)

    Full Changelog: v0.2.2...v0.2.3

    Open source →
    Release notes

    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 packed u32 into Rgba8 and PremulRgba8 are now provided. ([#135][] by [@tomcur][])
    • Support construction of AlphaColor<Srgb>, OpaqueColor<Srgb> and PremulColor<Srgb> from rgb8 values. ([#136][] by [@waywardmonkeys][])

    Fixed

    • Specify some ColorSpace::WHITE_COMPONENTS to higher precision. ([#128][], [#129][] by [@tomcur][])
    Open source →
  7. 0.2.2 03 Jan 2025
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Fixed

    Full Changelog: v0.2.1...v0.2.2

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Fixed

    • Colors in XyzD65 are serialized as xyz-d65 rather than xyz. ([#118][] by [@waywardmonkeys][])
    • Alpha values are clamped at parse time. ([#119][] by [@waywardmonkeys][])
    Open source →
  8. 0.2.1 28 Dec 2024
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Added

    • Add FromStr impl for AlphaColor, DynamicColor, OpaqueColor, PremulColor. (#111 by @waywardmonkeys)

    Changed

    • Don't enable serde's std feature when enabling our std feature. (#108 by @waywardmonkeys)
    • From<Rgba8> for PremulColor is deprecated and replaced by From<PremulRgba8>. (#113 by @waywardmonkeys)

    Fixed

    Full Changelog: v0.2.0...v0.2.1

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Added

    • Add FromStr impl for AlphaColor, DynamicColor, OpaqueColor, PremulColor. ([#111][] by [@waywardmonkeys][])

    Changed

    • Don't enable serde's std feature when enabling our std feature. ([#108][] by [@waywardmonkeys][])
    • From<Rgba8> for PremulColor is deprecated and replaced by From<PremulRgba8>. ([#113][] by [@waywardmonkeys][])

    Fixed

    • Make color parsing case insensitive. ([#109][] by [@raphlinus][])
    Open source →
  9. 0.2.0 17 Dec 2024
    Release notes

    Crates.io | Docs

    This release has an MSRV of 1.82.

    Added

    Changed

    Fixed

    • Stray parenthesis in hex serialization of Rgba8 fixed. (#78 by @raphlinus)

    New Contributors

    Full Changelog: v0.1.0...v0.2.0

    Open source →
    Release notes

    This release has an [MSRV][] of 1.82.

    Added

    • Add BLACK, WHITE, and TRANSPARENT constants to the color types. ([#64][] by [@waywardmonkeys][])
    • The serde feature enables using serde with AlphaColor, DynamicColor, HueDirection, OpaqueColor, PremulColor, and Rgba8. ([#61][], [#70][], [#80][] by [@waywardmonkeys][])
    • Conversion of a Rgba8 to a u32 is now provided. ([#66][], [#77][] by [@waywardmonkeys][], [#100][] by [@tomcur][])
    • A new PremulRgba8 type mirrors Rgba8, but for PremulColor. ([#66][] by [@waywardmonkeys][])
    • AlphaColor::with_alpha allows setting the alpha channel. ([#67][] by [@waywardmonkeys][])
    • Support for the ACEScg color space. ([#54][] by [@MightyBurger][])
    • DynamicColor gets with_alpha and multiply_alpha. ([#71][] by [@waywardmonkeys][])
    • DynamicColor now impls PartialEq. ([#75][] by [@waywardmonkeys][])
    • AlphaColor, OpaqueColor, and PremulColor now impl PartialEq. ([#76][], [#86][] by [@waywardmonkeys][])
    • HueDirection now impls PartialEq. ([#79][] by [@waywardmonkeys][])
    • ColorSpaceTag and HueDirection now have bytemuck support. ([#81][] by [@waywardmonkeys][])
    • A DynamicColor parsed 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][]).
    • CacheKey to allow using colors as keys for resource caching. ([#92][] by [@DJMcNab][])

    Changed

    • The mul_alpha method was renamed to multiply_alpha. ([#65][] by [@waywardmonkeys][])

    Fixed

    • Stray parenthesis in hex serialization of Rgba8 fixed. ([#78][] by [@raphlinus][])
    Open source →
  10. 0.1.0 20 Nov 2024
    Release notes

    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.

    Open source →
    Release notes

    This release has an MSRV of 1.82.

    This is the initial release.

    Open source →
  11. 0.0.1 21 Nov 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive