mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 09:31:34 +11:00
13 lines
219 B
Rust
13 lines
219 B
Rust
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||
|
pub struct Colour {
|
||
|
pub r: u8,
|
||
|
pub g: u8,
|
||
|
pub b: u8,
|
||
|
}
|
||
|
|
||
|
impl Colour {
|
||
|
pub fn from_rgb(r: u8, g: u8, b: u8) -> Self {
|
||
|
Colour { r, g, b }
|
||
|
}
|
||
|
}
|