public static double colorDistance(double r1,double g1,double b1,double r2,double g2,double b2){
  double a=(r2 - r1) + 0.1;
  double b=(g2 - g1) + 0.1;
  double c=(b2 - b1) + 0.1;
  return Math.sqrt(a * a + b * b + c * c);
}

public static double colorDistance ( double r1 , double g1 , double b1 , double r2 , double g2 , double b2 ) { double a = ( r2 - r1 ) + 0.1 ; double b = ( g2 - g1 ) + 0.1 ; double c = ( b2 - b1 ) + 0.1 ; return Math . sqrt ( a * a + b * b + c * c ) ; }
simple color distance . ( 3d point distance )
