18 lines
435 B
Rust
18 lines
435 B
Rust
use embedded_graphics::pixelcolor::Rgb565;
|
|
use embedded_graphics::pixelcolor::Rgb888;
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub struct Rgb(pub u8, pub u8, pub u8);
|
|
|
|
impl Rgb {
|
|
pub fn into_rgb565(self) -> Rgb565 {
|
|
Rgb888::new(self.0, self.1, self.2).into()
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub struct TypeStyle {
|
|
pub name: &'static str,
|
|
pub primary: Rgb,
|
|
pub text: Rgb,
|
|
}
|