#[repr(C)]pub struct Color {
pub blue: u8,
pub green: u8,
pub red: u8,
}Expand description
RGB888 color matching lv_color_t { blue, green, red } layout.
Fields§
§blue: u8§green: u8§red: u8Implementations§
Source§impl Color
impl Color
Sourcepub const fn make(r: u8, g: u8, b: u8) -> Self
pub const fn make(r: u8, g: u8, b: u8) -> Self
Construct a color from red, green, blue components (0–255 each).
Sourcepub fn hex(hex: u32) -> Self
pub fn hex(hex: u32) -> Self
Construct a color from a packed 24-bit RGB hex value (e.g. 0xFF8800).
Sourcepub fn palette_main(p: u32) -> Self
pub fn palette_main(p: u32) -> Self
Return the main (500-shade) color of an LVGL palette family.
p must be one of the PALETTE_* constants (e.g. PALETTE_BLUE).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more