diff options
author | Genny <gen@nyble.dev> | 2021-11-21 18:35:57 -0600 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2021-11-21 18:35:57 -0600 |
commit | 1de64a3818875947f7f1044b1d4cfdf271b04fd3 (patch) | |
tree | 3a5bfbb237d67832dfa1beeb3d28566173484b63 /src/color.rs | |
parent | f35e18cb0531e7d6a3544560746d592aa47ed555 (diff) | |
download | gifed-1de64a3818875947f7f1044b1d4cfdf271b04fd3.tar.gz gifed-1de64a3818875947f7f1044b1d4cfdf271b04fd3.zip |
Bring gifprobe into this repository
Diffstat (limited to 'src/color.rs')
-rw-r--r-- | src/color.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/color.rs b/src/color.rs deleted file mode 100644 index e18ce58..0000000 --- a/src/color.rs +++ /dev/null @@ -1,38 +0,0 @@ -#[derive(Copy, Clone, Debug, PartialEq)] -pub struct Color { - pub r: u8, - pub g: u8, - pub b: u8, -} - -impl Color { - pub fn new(r: u8, g: u8, b: u8) -> Self { - Self { r, g, b } - } -} - -impl From<[u8; 3]> for Color { - fn from(arr: [u8; 3]) -> Self { - Self { - r: arr[0], - g: arr[1], - b: arr[2], - } - } -} - -impl From<(u8, u8, u8)> for Color { - fn from(t: (u8, u8, u8)) -> Self { - Self { - r: t.0, - g: t.1, - b: t.2, - } - } -} - -impl Into<[u8; 3]> for Color { - fn into(self) -> [u8; 3] { - [self.r, self.g, self.b] - } -} |