Optionalcolors?: numberThe maximum number of colors to keep (2-256). Images with fewer distinct colors keep them exactly; otherwise
ImageScript chooses a smaller set of representative colors. Give palette instead to choose exact colors.
Optionalpalette?: neverNot with colors: give one of them
Optionalcolors?: neverNot with palette: give one of them
A fixed palette (1-256 colors, e.g. a Game Boy's four greens). Every pixel is changed to the nearest palette color by its red, green and blue values; transparency in palette colors is ignored
Options of Image.quantize: either
colorsorpalette(TypeScript reports a call with both), and the dithering