mod color_9_bit;
pub use color_9_bit::*;
mod color_24bit;
pub use color_24bit::*;
#[derive(Debug, Clone, Copy, PartialEq, Hash, Default)]
pub struct PaletteID(pub u8);
#[derive(Debug, Clone, Copy, PartialEq, Hash)]
pub struct ColorID(pub u8);
impl PaletteID {
pub fn id(self) -> usize {
self.0 as usize
}
}
impl ColorID {
pub fn id(self) -> usize {
self.0 as usize
}
}
pub const BG_COLOR: ColorID = ColorID(0);
pub const BLACK: ColorID = ColorID(1);
pub const GRAY: ColorID = ColorID(2);
pub const WHITE: ColorID = ColorID(3);
pub const DARK_RED: ColorID = ColorID(4);
pub const RED: ColorID = ColorID(5);
pub const LIGHT_RED: ColorID = ColorID(6);
pub const ORANGE: ColorID = ColorID(7);
pub const YELLOW: ColorID = ColorID(8);
pub const DARK_GREEN: ColorID = ColorID(9);
pub const GREEN: ColorID = ColorID(10);
pub const GREENLIGHT: ColorID = ColorID(11);
pub const DARK_BLUE: ColorID = ColorID(12);
pub const BLUE: ColorID = ColorID(13);
pub const LIGHT_BLUE: ColorID = ColorID(14);
pub const PINK: ColorID = ColorID(15);
pub(crate) const PALETTE_DEFAULT: [Color9Bit; 16] = [
Color9Bit::new(0, 0, 0), Color9Bit::new(0, 0, 0), Color9Bit::new(3, 3, 3), Color9Bit::new(6, 6, 6), Color9Bit::new(3, 1, 0), Color9Bit::new(5, 2, 2), Color9Bit::new(6, 4, 4), Color9Bit::new(5, 3, 0), Color9Bit::new(6, 5, 1), Color9Bit::new(1, 2, 1), Color9Bit::new(1, 4, 1), Color9Bit::new(4, 5, 3), Color9Bit::new(1, 1, 3), Color9Bit::new(2, 2, 6), Color9Bit::new(3, 5, 6), Color9Bit::new(5, 2, 4), ];