colours
This commit is contained in:
parent
5c612c27bc
commit
984adbd942
|
@ -83,10 +83,10 @@ enum Colour {
|
|||
impl Colour {
|
||||
fn to_rgb(&self) -> u32 {
|
||||
match self {
|
||||
Colour::White => Self::from_u8_rgb(255, 255, 255),
|
||||
Colour::LightGray => Self::from_u8_rgb(190, 190, 190),
|
||||
Colour::DarkGray => Self::from_u8_rgb(110, 110, 110),
|
||||
Colour::Black => Self::from_u8_rgb(20, 20, 20),
|
||||
Colour::White => Self::from_u8_rgb(0xFF, 0xFF, 0xFF),
|
||||
Colour::LightGray => Self::from_u8_rgb(0xAA, 0xAA, 0xAA),
|
||||
Colour::DarkGray => Self::from_u8_rgb(0x55, 0x55, 0x55),
|
||||
Colour::Black => Self::from_u8_rgb(0x00, 0x00, 0x00),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -461,8 +461,8 @@ fn byte_to_palette(byte: u8) -> Palette {
|
|||
fn bits_to_colour(first: bool, second: bool) -> Colour {
|
||||
match (first, second) {
|
||||
(true, true) => Colour::Black,
|
||||
(true, false) => Colour::DarkGray,
|
||||
(false, true) => Colour::LightGray,
|
||||
(true, false) => Colour::LightGray,
|
||||
(false, true) => Colour::DarkGray,
|
||||
(false, false) => Colour::White,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue