rgb/formats/abgr.rs
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/// An `Alpha + Blue + Green + Red` pixel.
6///
7/// # Examples
8///
9/// ```
10/// use rgb::Abgr;
11///
12/// let pixel: Abgr<u8> = Abgr { a: 255, b: 0, g: 0, r: 0 };
13/// ```
14pub struct Abgr<T, A = T> {
15 /// Alpha Component
16 pub a: A,
17 /// Blue Component
18 pub b: T,
19 /// Green Component
20 pub g: T,
21 /// Red Component
22 pub r: T,
23}