    pub fn as_array(self) -> [u8; 3] {
        [self.r, self.g, self.b]
    }
}

impl From<Vec3> for Color {
    #[inline]
    fn from(a: Vec3) -> Self {
        Color {
            r: (a.x * 255.99) as u8,
            g: (a.y * 255.99) as u8,
            b: (a.z * 255.99) as u8,
        }