code: function distEuclidean(rgb0, rgb1) {
  		var rd = rgb1[0]-rgb0[0],
  			gd = rgb1[1]-rgb0[1],
  			bd = rgb1[2]-rgb0[2];
  
  		return Math.sqrt(Pr*rd*rd + Pg*gd*gd + Pb*bd*bd) / euclMax;
  	}
docs: perceptual Euclidean color distance