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 <https://github.com/emilk/egui/issues/7131>
* [x] I have followed the instructions in the PR template
This commit is contained in:
Nicolas 2025-06-16 01:40:42 +02:00 committed by GitHub
parent 742da95bd7
commit f33ff2c83d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -4,6 +4,7 @@ use crate::{
/// Hue, saturation, value, alpha. All in the range [0, 1]. /// Hue, saturation, value, alpha. All in the range [0, 1].
/// No premultiplied alpha. /// No premultiplied alpha.
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[derive(Clone, Copy, Debug, Default, PartialEq)] #[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct Hsva { pub struct Hsva {
/// hue 0-1 /// hue 0-1