pub fn square_distance(color1: Rgb, color2: Rgb) -> i32 {
    let (r1, g1, b1) = (color1.r as i32, color1.g as i32, color1.b as i32);
    let (r2, g2, b2) = (color2.r as i32, color2.g as i32, color2.b as i32);
    i32::pow(r1 - r2, 2) + i32::pow(g1 - g2, 2) + i32::pow(b1 - b2, 2)
}
/// Gets the square distance between two colours
Gets the square distance between two colours
Gets the square distance between two colours
pub fn square_distance(color1: Rgb, color2: Rgb) -> i32 {
    let (r1, g1, b1) = (color1.r as i32, color1.g as i32, color1.b as i32);
    let (r2, g2, b2) = (color2.r as i32, color2.g as i32, color2.b as i32);
    i32::pow(r1 - r2, 2) + i32::pow(g1 - g2, 2) + i32::pow(b1 - b2, 2)
}
pub fn square_distance ( color1 : Rgb , color2 : Rgb ) -> i32 { let ( r1 , g1 , b1 ) = ( color1 . r as i32 , color1 . g as i32 , color1 . b as i32 ) ; let ( r2 , g2 , b2 ) = ( color2 . r as i32 , color2 . g as i32 , color2 . b as i32 ) ; i32 :: pow ( r1 - r2 , 2 ) + i32 :: pow ( g1 - g2 , 2 ) + i32 :: pow ( b1 - b2 , 2 ) }
Gets the square distance between two colours
Gets the square distance between two colours
color1
Rgb
color2
Rgb