I have images like this ones:
And I want to change its colour palette so they look like this one:
What I do is to reduce the amounts of colours in the image to a specific subset of 17. I need to be this specific 17 because I have to apply this process to around 700 images and I need consistency.
When I use gimp to archive this goal what I usually do is to create a colour palette based on an image and then Image > Mode > Indexed and choose the colour palette.
My plan was to do something similar using Pillow, but I haven't been able to find a successful way to do it.
Any suggestions? Should I try a different approach?
Thanks!