quantize
quantize copied to clipboard
Function should be able to return an exact number of colors requested
Currently: maximumColorCount - The maximum number of colours allowed in the reduced palette
When 1 <= maximumColorCount <= 7, the function returns exactly maximumColorCount colors.
When 7 < maximumColorCount, the function returns exactly maximumColorCount - 1 colors.