changed test for lowest RMS distance in color space