palette
Convert and manage colors with a focus on correctness, flexibility and ease of use.
0.7.7
16M downloads/mo
#2376 most downloaded on crates.io
Ogeon/palette
What this package is like to depend on
Last release 21 days ago
02 Aug 2026
Release timing varies
gaps range from 4 weeks to 2.3 years
Nearly every release is documented
notes for 18 of 18 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
18 releases · first in 2016
1 release in the last 12 months
see the full history below
Release timeline
18 releases · Jan 2016 to Aug 2026Releases
latest 18-
0.7.702 Aug 2026Release notes
Open source →- [#476][476]: Fix
normalize_unsigned_angleoutput for very small numbers. Closes [#473][473]. - [#474][474]: Fix conversion into HSLuv when L is near or below 0, or near or above 100. Closes [#472][472].
- [#465][465]: Document feature flags. Closes [#415][415].
- [#462][462]: Increase MSRV to 1.71.0.
- [#456][456]: Updates documentation of
palette::alphamodule. - [#437][437]: Introduce
palette_mathand refactor gamma LUT code. - [#427][427]: Deprecate
encoding::gammaand its content. - [#416][416]: Add
FromLinearandIntoLinearlookup table creation to build script. - [#424][424]: Add
Rgb::from_hexand implement parsing foru16,u32,f32,f64. Closes [#420][420], [#306][306]. - [#422][422]: Add named color iterators and remove phf macro dependency. Closes [#421][421].
- [#413][413]: Add ProPhoto RGB standard.
- [#412][412]: Add DCI-P3, DCI-P3+, and Display P3. Closes [#367][367].
- [#411][411]: Add Adobe RGB.
- [#410][410]: Add Rec. 709 and Rec. 2020.
- [#407][407]: Rework chromatic adaptation. Closes [#244][244].
- [#406][406]: Add conversion matrix and
Convert{Once}traits. - [#405][405]: Make hue
::from_degreesand somepalette::cast::*functionsconst fn. - [#400][400]: Implement LMS. Closes [#352][352].
- [#476][476]: Fix
-
0.7.628 Apr 2024Release notes
Open source →- [#390][390]: Add
Fromimplementations for changingRgbcomponent types betweenu8,f32andf64. - [#342][342]: Implement CAM16. Closes [#199][199].
- [#386][386]: Fix angle conversion from
f32tou8. Closes [#385][385]. - [#384][384]: Add traits for color schemes from traditional color theory.
- [#390][390]: Add
-
0.7.525 Feb 2024Release notes
Open source →- [#380][380]: Avoid recursive trait resolution for
IntoIterator. Closes [#283][283].
- [#380][380]: Avoid recursive trait resolution for
-
0.7.428 Jan 2024Release notes
Open source →- [#373][373]: Add an "alloc" feature and make tests work with any feature combination. Closes [#366][366].
- [#374][374]: Fix typo about max range of u8.
- [#369][369]: Fix potential
NaNfrom converting toOkhslwhen the input is white or black. Closes [#368][368]. - [#355][355]: Add traits for delta E and the improved formulas from Huang et al.
- [#351][351]: Improve some documentation for beginners.
- [#347][347]: Implements Rgba::from_str().
-
0.7.310 Aug 2023Release notes
Open source →346: Version 0.7.3 r=Ogeon a=github-actions[bot]
Prepare release 0.7.3
Co-authored-by: Ogeon [email protected]
Co-authored-by: Erik Hedvall [email protected]Release notes
Open source →- [#345][345]: Add
ArraysAs,AsArrays, and corresponding traits for components and uints. - [#344][344]: Fix Oklab from Oklch hue conversion.
- [#343][343]: Spelling fixes.
- [#338][338]: Add traits for casting collections of colors to and from other data types.
- [#345][345]: Add
-
0.7.221 May 2023Release notes
Open source →333: Version 0.7.2 r=Ogeon a=github-actions[bot]
Prepare release 0.7.2
Co-authored-by: Ogeon [email protected]
Release notes
Open source →- [#332][332]: Fix NaN values from
Okhsvwhensaturationis > 0 andvalue== 0. Closes [#330][330]. - [#328][328]: Add the HyAB color difference metric. Closes [#318][318].
- [#326][326]: Add a
Wcag21RelativeContrasttrait and deprecateRelativeContrast. - [#320][320]: Implement struct-of-arrays (SoA) utilities. Closes [#305][305].
- [#323][323]: Add saturating_add and saturating_sub for integer based colors. Closes [#322][322].
- [#321][321]: Spelling fixes.
- [#316][316]: Add
EuclideanDistanceandCiede2000traits, deprecateColorDifference. Closes [#288][288].
- [#332][332]: Fix NaN values from
-
0.7.116 Apr 2023Release notes
Open source →315: Version 0.7.1 r=Ogeon a=github-actions[bot]
Prepare release 0.7.1
Co-authored-by: Ogeon [email protected]
Co-authored-by: Erik Hedvall [email protected]Release notes
Open source →- [#313][313]: Improve serializing. Closes [#130][130].
- [#312][312]: Remove
impl<C> $op_trait<PreAlpha<C>> for {f32,f64}impls to work around issue #283. Closes [#283][283].
-
0.7.010 Apr 2023Release notes
Open source →311: Version 0.7.0 r=Ogeon a=github-actions[bot]
Prepare release 0.7.0
Co-authored-by: Ogeon [email protected]
Release notes
Open source →- [#308][308]: Allow RGB/XYZ conversion matrices to be pre-defined.
- [#307][307]: Update
synand dev dependencies. - [#302][302]: Lift linearity restriction for
RgbandLumaand update docs. - [#301][301]: Remove the
Gradienttype and its module. Closes [#152][152], [#156][156]. - [#282][282]: Add
Okhsv,OkhslandOkhwb. - [#297][297]: Expose doc comment for
Rgb::from_str. - [#286][286]: Reduce the minimum compile time a bit.
- [#279][279]: Split the
TransferFntrait and add lookup tables for sRGB. Closes [#126][126], [#245][245]. - [#278][278]: Implement SIMD support and add
wideintegration. - [#273][273]: Split and rework the
Blendtrait and bump MSRV to 1.55.0. Closes [#243][243]. - [#272][272]: Fix broken link to SVG color names.
- [#270][270]: Correcting documentation link.
- [#269][269]: Rework component traits to be more granular and remove
num_traits. - [#257][257]: Add in-place conversion traits for slices and references.
- [#256][256]: Implement
FromColorUnclampedandFromColorforVec<T>andBox<[T]>. - [#255][255]: Add unsigned integer casting to
castand makePackedgeneral purpose. - [#254][254]: Replace the
Pixeltrait withArrayCastand cast functions and increase the MSRV to 1.51.0. - [#251][251]: Split
SaturateintoSaturateandDesaturate. - [#250][250]: Split the
Huetrait into more specific traits. - [#249][249]: Split
ShadeintoLightenandDarken, and add*Assignvariants. - [#248][248]: Add a
MixAssigntrait and remove theFloatrequirement fromMix. - [#247][247]: Split
Clampinto smaller traits and implement for[T]. - [#246][246]: Make most operator traits take their input by value and change
TransferFntoTransferFn<T>. - [#240][240]: Add an Any white point. Closes [#194][194].
- [#239][239]: Make color constructors const and remove or replace all
with_wp. Closes [#134][134]. - [#238][238]: Relax trait bounds for all color types.
-
0.6.116 Jul 2022 -
0.6.012 Jul 2021Release notes
Open source →237: Version 0.6.0 r=Ogeon a=github-actions[bot]
Prepare release 0.6.0
Co-authored-by: Ogeon [email protected]
Co-authored-by: Erik Hedvall [email protected]Release notes
Open source →- [#235][235]: Upgrade phf to 0.9 and enable named_from_str for no_std.
- [#200][200]: Add Oklab support. Closes [#222][222].
- [#231][231]: Update
approxandfind-cratedependencies. - [#229][229]: Implement
bytemuck::Zeroableandbytemuck::Podfor every color type. - [#225][225]: Add Hsluv support. Closes [#112][112].
- [#223][223]: Add Lchuv support.
- [#221][221]: Add CIE Luv support.
- [#217][217]: Implement relative and absolute methods for Lighten/Darken, Saturate. Closes [#215][215].
- [#216][216]: Add doc alias, doc cleanups, remove trait from Packed struct.
- [#211][211]: Implement PartialEq/Eq for all colorspaces, Alpha, PreAlpha, and LabHue/RgbHue. Closes [#206][206].
- [#210][210]: Rename Limited trait to Clamp. Closes [#209][209].
- [#205][205]: Generalizing gradients and add constant gradients. Closes [#62][62].
- [#190][190]: Convert documentation to intra doc links, add default whitepoint for Lab/Lch, make code fixups. Closes [#177][177].
- [#189][189]: Correct scaling on random distribution of Lab/Lch.
- [#188][188]: Allow HSV, HSL and HWB to represent nonlinear RGB. Closes [#160][160], [#187][187].
- [#184][184]: Optimize into_component for float_to_uint, u8 to f32/f64.
- [#183][183]: Optimize matrix functions, color conversion performance.
- [#176][176]: Rewrite the conversion traits to work more like From and Into. Closes [#41][41], [#111][111].
- [#175][175]: Add feature "random" for random color generation using
randcrate. Closes [#174][174]. - [#173][173]: Add functions to get min/max component values for all color types, alpha.
- [#170][170]: Add
{into,from}_u32methods for RGB/A, Packed struct for u32 representations of RGBA. Closes [#144][144]. - [#164][164]: Implement WCAG contrast ratio calculations.
- [#162][162]: Implement CIEDE2000 color difference for Lab/Lch. Closes [#143][143].
- [#161][161]: Split the Component trait into more specific traits.
- [#157][157]: Implement
FromStrmethod forRgb<S, u8>. Closes [#148][148]. - [#158][158]: Make
Takeiterator for gradient inclusive of both end colors, add tests. - [#154][154]: Add DoubleEndedIterator impl for gradient::Take. Closes [#153][153].
- [#137][137]: Add some missing
Fromimpls betweenSrgbandLinSrgbtypes.
-
0.5.017 Nov 2019Release notes
Open source →- [#149][149]: Use libm through num_traits, and update all dependencies.
- [#142][142]: Make libm optional. Closes [#116][116].
- [#138][138]: Fix no_std build failure.
- [#136][136]: Update dependencies and remove --release flag from feature tests.
- [#135][135]: Round to nearest instead of down when converting components to integers.
- [#127][127]: fix no_std. Closes [#125][125].
- [#124][124]: Update approx dependency to 0.3.
- [#119][119]: Remove the color enum. Closes [#72][72].
- [#118][118]: Implement assign ops. Closes [#94][94].
- [#110][110]: No std support. Closes [#108][108].
- [#106][106]: Add Extended Conversion Trait.
- [#104][104]: Update image and approx crate dependency. Closes [#101][101], [#100][100].
-
0.4.102 Aug 2018 -
0.4.026 May 2018Release notes
Open source →- [#99][99]: Fix into and from component tuple conversion for Yxy.
- [#98][98]: Add conversion to and from component tuples. Closes [#87][87].
- [#97][97]: Add hexadecimal formatting to Alpha, Luma and Rgb. Closes [#80][80].
- [#96][96]: Reexport derives from the main library. Closes [#91][91].
- [#93][93]: Make it possible to derive Pixel. Closes [#85][85].
- [#92][92]: Add transparency support when deriving FromColor and IntoColor. Closes [#86][86].
- [#90][90]: Add serde support as an optional feature. Closes [#83][83].
- [#89][89]: Improve the hue types a bit. Closes [#75][75].
- [#84][84]: Make it possible to derive IntoColor and FromColor. Closes [#82][82].
- [#81][81]: Make a new system for converting to and from arrays and slices. Closes [#74][74].
-
0.3.017 Feb 2018Release notes
Open source →- [#78][78]: Upgrade dependencies.
- [#60][60]: Generalize the RGB types over RGB standards. Closes [#66][66], [#31][31], [#58][58].
- [#76][76]: Change dependency
numtonum_traitsto shrink dependency tree. - [#63][63]: Add rebeccapurple.
- [#61][61]: Restore the proper scale of Lab and Lch. Closes [#49][49].
- [#56][56]: Make color spaces white point aware. Closes [#14][14].
-
0.2.123 Feb 2016Release notes
Open source →- [#39][39]: Implement color blending. Closes [#3][3].
- [#54][54]: Faster Rgb to Hsl and Hsv conversions.
- [#52][52]: Add missing ApproxEq implementations.
- [#53][53]: Add hwb color. Closes [#32][32].
- [#51][51]: Implement approx eq trait.
- [#48][48]: Add tests for conversions. Closes [#44][44].
- [#47][47]: Change normalize to use floor and ceil formula. Closes [#46][46].
- [#43][43]: Add conversion trait.
- [#34][34]: Add color constants. Closes [#5][5].
- [#35][35]: use flt() function. Closes [#33][33].
- [#30][30]: Add Cie Yxy (xyY) Color Space.
- [#29][29]: Derive Clone for Take and MaybeSlice.
-
0.2.030 Jan 2016Release notes
Open source →- [#26][26]: Offer both 0 centered and positive hue -> float conversion. Closes [#15][15].
- [#25][25]: Fix or relax some color ranges and clamping. Closes [#19][19].
- [#22][22]: Extract the alpha component as a wrapper type. Closes [#11][11].
- [#24][24]: Separate sRGB and gamma encoded RGB from the Rgb type. Closes [#7][7].
- [#23][23]: Change Mix, Shade and Saturate to use an associated type.
- [#18][18]: Convert all colors to be generic over floats, f32 and f64. Closes [#13][13].
-
0.1.121 Jan 2016Release notes
Open source →- [#12][12]: Implement Gradient slicing and exact size iteration. Closes [#4][4].
- [#9][9]: Implement color arithmetics. Closes [#2][2].
-
0.1.012 Jan 2016