public function simpleRgbDistance($color1, $color2)
    {
        $deltaR = ($color2->r - $color1->r) / 255;
        $deltaG = ($color2->g - $color1->g) / 255;
        $deltaB = ($color2->b - $color1->b) / 255;
        $deltaE = $deltaR * $deltaR + $deltaG * $deltaG + $deltaB * $deltaB;

        return ($deltaE < 0)
            ? $deltaE
            : sqrt($deltaE) * 57.73502691896258;  //  / sqrt(3) * 100;
    }
public function simpleRgbDistance($color1, $color2)
    {
        $deltaR = ($color2->r - $color1->r) / 255;
        $deltaG = ($color2->g - $color1->g) / 255;
        $deltaB = ($color2->b - $color1->b) / 255;
        $deltaE = $deltaR * $deltaR + $deltaG * $deltaG + $deltaB * $deltaB;

        return ($deltaE < 0)
            ? $deltaE
            : sqrt($deltaE) * 57.73502691896258;  //  / sqrt(3) * 100;
    }
public function simpleRgbDistance ( $ color1 , $ color2 ) { $ deltaR = ( $ color2 -> r - $ color1 -> r ) / 255 ; $ deltaG = ( $ color2 -> g - $ color1 -> g ) / 255 ; $ deltaB = ( $ color2 -> b - $ color1 -> b ) / 255 ; $ deltaE = $ deltaR * $ deltaR + $ deltaG * $ deltaG + $ deltaB * $ deltaB ; return ( $ deltaE < 0 ) ? $ deltaE : sqrt ( $ deltaE ) * 57.73502691896258 ; //  / sqrt(3) * 100; }
Not very useful, but interesting to compare.
Not very useful but interesting to compare .