From https://lumiamitie.github.io/r/imager-color-quantization/

quantize_colors(img, n = 16)

Arguments

img

cimage

n

number of colors in returned image

Value

a cimage with only n colors