gets a palette of prominent colors from an array of pixels