Renamed the Rgb struct to Color
This commit is contained in:
4 files changed
+29
-29
No files matched your search
@@ -0,0 +1,12 @@
|
||||
#[derive(Default)]
|
||||
pub struct Color {
|
||||
pub red: u8,
|
||||
pub green: u8,
|
||||
pub blue: u8,
|
||||
}
|
||||
|
||||
impl Color {
|
||||
pub fn to_array(self) -> [u8; 3] {
|
||||
[self.red, self.green, self.blue]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user