imagemin / imagemin-pngquant

Imagemin plugin for `pngquant`
MIT License
316 stars 81 forks source link

Supports [ncolors] argument as option #59

Open fabianmichael opened 5 years ago

fabianmichael commented 5 years ago

pngquant supports an additional argument after passing the options, called [ncolors] for setting the palette size. For advanced optimization, it would be useful to have this available as an option:

pngquant [options] [ncolors] -- pngfile [pngfile ...]

Use cases are black-and white illustrations, such as icons, drawings or line-art, where a palette of 256 colors does not bring any noticable increase in quality over a smaller palette of e.g. 16 or 32 colors.

I would propose to add an option called colors or ncolors to the plugin to make this option available in imagemin.