Extract dominant colors from an image as a palette.