added touch

This commit is contained in:
Nilton Constantino
2026-01-14 09:14:59 +00:00
parent 25fdfdb299
commit 4a28305643
5 changed files with 51 additions and 32 deletions
+5 -3
View File
@@ -9,17 +9,19 @@
pub struct Color(pub u16);
impl Color {
pub const INDIGO: Self = Self::rgb(32, 32, 64);
pub const GRAY: Self = Self::rgb(64, 64, 64);
pub const BLACK: Self = Self::rgb(0, 0, 0); // 0x0000
pub const WHITE: Self = Self::rgb(255, 255, 255); // 0xFFFF
pub const RED: Self = Self::rgb(255, 0, 0); // 0xF800
pub const GREEN: Self = Self::rgb(0, 255, 0); // 0x07E0
pub const BLUE: Self = Self::rgb(0, 0, 255); // 0x001F
pub const YELLOW: Self = Self::rgb(255, 255, 0); // 0xFFE0
pub const CYAN: Self = Self::rgb(0, 255, 255); // 0x07FF
pub const ORANGE: Self = Self::rgb(255, 128, 0);
pub const INDIGO: Self = Self::rgb(75, 0, 130);
pub const GRAY: Self = Self::rgb(128, 128, 128);
pub const CYAN: Self = Self::rgb(0, 255, 255); // 0x07FF
pub const MAGENTA: Self = Self::rgb(255, 0, 255); // 0xF81F
pub const COLOR_KEY: Self = Self::MAGENTA;
pub const TRANSPARENT: Self = Self::MAGENTA;
/// Extrai canais já na faixa nativa do RGB565:
/// R: 0..31, G: 0..63, B: 0..31