Trait ws2812_flexio::Pixel
source · pub trait Pixel {
type BytesIter: Iterator<Item = u8>;
// Required method
fn into_ws2812_bytes(self) -> Self::BytesIter;
}Expand description
A pixel that can be rendered with this library.
Required Associated Types§
sourcetype BytesIter: Iterator<Item = u8>
type BytesIter: Iterator<Item = u8>
The return type of the into_ws2812_bytes() function.
Required Methods§
sourcefn into_ws2812_bytes(self) -> Self::BytesIter
fn into_ws2812_bytes(self) -> Self::BytesIter
Return the raw bytes that should be sent to the LED strip.
IMPORTANT: Be aware that WS2812 strips are GRB encoded.
Implementations on Foreign Types§
source§impl Pixel for LinSrgb<u8>
impl Pixel for LinSrgb<u8>
8-bit Linear sRGB, which is the color space most NeoPixel strips are in.
Be aware that this differs from normal, gamma-corrected sRGB. A conversion has to take place.
More info can be found in the documentation of the palette crate.