diff --git a/lights/src/lib.rs b/lights/src/lib.rs index 47b67c9..7d6b51e 100644 --- a/lights/src/lib.rs +++ b/lights/src/lib.rs @@ -13,7 +13,7 @@ use core::borrow::Borrow; /// An RGB value in physical color space, which should be passed on to an LED for display. /// Not suitable for color operations, since its values won't be perceptually linear. /// See the [rgb] module for the former, and the [gamma] module to convert into this. -#[derive(Clone, Copy)] +#[derive(Clone, Copy, PartialEq)] pub struct HardwareRgb(pub u8, pub u8, pub u8); /// Represents a string of lights which can be individually updated in linear order. diff --git a/lights/src/rgb.rs b/lights/src/rgb.rs index c54b6fd..64299b0 100644 --- a/lights/src/rgb.rs +++ b/lights/src/rgb.rs @@ -3,7 +3,7 @@ /// An RGB color value in some perceptual color space; /// ideally this will be gamma-corrected before display, /// but this form is better for doing gradient/fade/etc calculations on. -#[derive(Clone, Copy)] +#[derive(Clone, Copy, PartialEq)] pub struct Rgb(pub u8, pub u8, pub u8); impl core::ops::Add for Rgb {