| 1 |
#[repr(C)] |
| 2 |
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] |
| 3 |
#[cfg_attr(feature = "defmt-03", derive(defmt::Format))] |
| 4 |
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)] |
| 5 |
/// A `Green + Red + Blue` pixel. |
| 6 |
/// |
| 7 |
/// # Examples |
| 8 |
/// |
| 9 |
/// ``` |
| 10 |
/// use rgb::Grb; |
| 11 |
/// |
| 12 |
/// let pixel: Grb<u8> = Grb { g: 0, r: 0, b: 0 }; |
| 13 |
/// ``` |
| 14 |
pub struct Grb<T> { |
| 15 |
/// Green Component |
| 16 |
pub g: T, |
| 17 |
/// Red Component |
| 18 |
pub r: T, |
| 19 |
/// Blue Component |
| 20 |
pub b: T, |
| 21 |
} |