changed distanceRGB to take arrays as params and pixelToRGB to return an array