make RGB PartialEq

This commit is contained in:
Tangent Wantwight 2019-12-21 17:50:35 -05:00
parent b6b53c4dbc
commit 8a1b23ba79
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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 {