Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ You can find its changes [documented below](#032-2025-09-10).

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][])

## [0.3.2][] (2025-09-10)

This release has an [MSRV][] of 1.82.
Expand Down Expand Up @@ -152,6 +156,7 @@ This release has an [MSRV][] of 1.82.
This is the initial release.

[@ajakubowicz-canva]: https://github.com/ajakubowicz-canva
[@alvinisspicy]: https://github.com/alvinisspicy
[@DJMcNab]: https://github.com/DJMcNab
[@LaurenzV]: https://github.com/LaurenzV
[@MightyBurger]: https://github.com/MightyBurger
Expand Down Expand Up @@ -209,6 +214,7 @@ This is the initial release.
[#175]: https://github.com/linebender/color/pull/175
[#185]: https://github.com/linebender/color/pull/185
[#190]: https://github.com/linebender/color/pull/190
[#202]: https://github.com/linebender/color/pull/202

[Unreleased]: https://github.com/linebender/color/compare/v0.3.2...HEAD
[0.3.2]: https://github.com/linebender/color/releases/tag/v0.3.2
Expand Down
3 changes: 3 additions & 0 deletions color/src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub struct OpaqueColor<CS> {
/// The interpretation of the components depends on the color space.
pub components: [f32; 3],
/// The color space.
#[cfg_attr(feature = "serde", serde(skip))]
pub cs: PhantomData<CS>,
}

Expand All @@ -55,6 +56,7 @@ pub struct AlphaColor<CS> {
/// space. The fourth component is separate alpha.
pub components: [f32; 4],
/// The color space.
#[cfg_attr(feature = "serde", serde(skip))]
pub cs: PhantomData<CS>,
}

Expand Down Expand Up @@ -86,6 +88,7 @@ pub struct PremulColor<CS> {
/// components yourself, be aware.
pub components: [f32; 4],
/// The color space.
#[cfg_attr(feature = "serde", serde(skip))]
pub cs: PhantomData<CS>,
}

Expand Down