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?)