pub enum ColorFormat {
Argb8888,
Rgb888,
Rgb565,
Rgb444,
L8,
Mono,
}Expand description
Color resolution of the physical display.
The CPU framebuffer used by rlvgl is always 32-bit ARGB internally,
but the target display panel may have lower bit depth. This enum
describes the physical panel format so the simulator can apply the
same quantization to its preview window — banding, dithering, and
reduced colour space artefacts that the application would actually
see on the target hardware become visible on the host.
Hardware drivers ignore this field; their flush already targets
the panel’s native format. The field exists so simulators can
simulate the target colour space when previewing apps that will
ship to a lower-depth panel.
Variants§
Argb8888
True-colour 32-bit ARGB. No quantization.
Rgb888
True-colour 24-bit RGB. Discards alpha.
Rgb565
16-bit RGB565. 5 bits red, 6 bits green, 5 bits blue.
Rgb444
12-bit RGB444. 4 bits per channel — common on small TFTs.
L8
8-bit greyscale.
Mono
1-bit monochrome (e.g. e-paper).
Implementations§
Source§impl ColorFormat
impl ColorFormat
Trait Implementations§
Source§impl Clone for ColorFormat
impl Clone for ColorFormat
Source§fn clone(&self) -> ColorFormat
fn clone(&self) -> ColorFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more