1#[derive(Debug, Clone, Copy, Eq, PartialEq)]
2pub enum Color {
3 Black = 0,
4 Red = 1,
5 Green = 2,
6 Brown = 3,
7 Blue = 4,
8 Magenta = 5,
9 Cyan = 6,
10 White = 7,
11}
12
13impl From<Color> for u16 {
14 fn from(c: Color) -> Self {
15 c as Self
16 }
17}