make RGB PartialEq
This commit is contained in:
parent
b6b53c4dbc
commit
8a1b23ba79
2 changed files with 2 additions and 2 deletions
|
@ -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.
|
/// 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.
|
/// 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.
|
/// 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);
|
pub struct HardwareRgb(pub u8, pub u8, pub u8);
|
||||||
|
|
||||||
/// Represents a string of lights which can be individually updated in linear order.
|
/// Represents a string of lights which can be individually updated in linear order.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/// An RGB color value in some perceptual color space;
|
/// An RGB color value in some perceptual color space;
|
||||||
/// ideally this will be gamma-corrected before display,
|
/// ideally this will be gamma-corrected before display,
|
||||||
/// but this form is better for doing gradient/fade/etc calculations on.
|
/// 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);
|
pub struct Rgb(pub u8, pub u8, pub u8);
|
||||||
|
|
||||||
impl core::ops::Add for Rgb {
|
impl core::ops::Add for Rgb {
|
||||||
|
|
Loading…
Reference in a new issue