quantize
Creates a ColorTable with a maximum number of colors from the given RGB data.
Return
A ColorTable containing the reduced colors.
Parameters
rgb
The RGB data. Each color is represented by three consecutive bytes in the order of red, green, and blue.
maxColors
The maximum number of colors to include in the color table.