I’m open to using GIMP or a web-based online tool

I’d like to take a source image and posterize it, but instead of letting the application pick the resulting colors, I’d like to pick them manually. So for every pixel, the app would change the color to one of my chosen colors