From f33ff2c83d5fe38592ed3f93182b67cdb6cf77ef Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 16 Jun 2025 01:40:42 +0200 Subject: [PATCH] Make `HSVA` derive serde (#7132) This pull request introduces a change to the `Hsva` struct in the `crates/ecolor/src/hsva.rs` file to enable serialization and deserialization when the `serde` feature is enabled. * Closes * [x] I have followed the instructions in the PR template --- crates/ecolor/src/hsva.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ecolor/src/hsva.rs b/crates/ecolor/src/hsva.rs index 02ffd67d..8388e413 100644 --- a/crates/ecolor/src/hsva.rs +++ b/crates/ecolor/src/hsva.rs @@ -4,6 +4,7 @@ use crate::{ /// Hue, saturation, value, alpha. All in the range [0, 1]. /// No premultiplied alpha. +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[derive(Clone, Copy, Debug, Default, PartialEq)] pub struct Hsva { /// hue 0-1