[−][src]Struct embedded_graphics::pixelcolor::Rgb565
A pixel type defining the commonly used RGB565 format
Pixel values are stored in a single u16
segmented as follows:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
r r r r r g g g g g g b b b b b
Methods
impl Rgb565
[src][−]
pub fn r(&self) -> u8
[src][−]
Get the red component as a u8
The least significant 3 bits will always be 0
pub fn g(&self) -> u8
[src][−]
Get the green component as a u8
The least significant 2 bits will always be 0
pub fn b(&self) -> u8
[src][−]
Get the blue component as a u8
The least significant 3 bits will always be 0
Trait Implementations
impl Clone for Rgb565
[src][+]
impl Copy for Rgb565
[src]
impl Debug for Rgb565
[src][+]
impl From<[u8; 2]> for Rgb565
[src][+]
impl From<(u8, u8, u8)> for Rgb565
[src][+]
impl From<u16> for Rgb565
[src][+]
impl From<u8> for Rgb565
[src][+]
impl PartialEq<Rgb565> for Rgb565
[src][+]
impl PixelColor for Rgb565
[src]
impl StructuralPartialEq for Rgb565
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,