@kabel42 @rl_dane If I remember later when Iβm back on my computer, Iβll hunt down the one liner I usually use. If I remember correctly my usual one does do color reduction but also normal PNG compression and general file compression I think.
Itβs been a long time since I actually cared about image file types so not as well versed in it these days - but I keep that handy since my work sometimes throws a lot of JPEGs and PNGs my way that need to be compressed in bulk to fit some file upload limits.
In GIMP, it's alt+i,m,i to convert to indexed color, and there are options there to specify a bespoke palette of n colors, or to use a pre-made custom palette, and dithering options.
Preview? In what sense?
Ah. Well, it's easy enough to convert, then rock back and forth with Ctrl+Z and Ctrl+Y (or was it Ctrl+Shift+Z?)
GIMP or Imagemagick.
For Imagemagick, it's as simple as convert meme.jpeg +dither -colors 16 meme.png
Sometimes I use GIMP to pick the colors more precisely.