07-17-2018, 04:38 PM
Not too sure that imposing a limited palette will work. How do you decide on the colours and match to an image.
However, throwing one into the hat.
1. You can take your defined colours from a palette and paint onto a canvas in RGB https://i.imgur.com/iMjZCvw.jpg
2. Then that will convert to indexed (with whatever number of colours) to give a colormap of the defined colors.
3. Anything that goes into that indexed image assumes the properties both indexed and colormap. https://i.imgur.com/ibloavC.jpg
but no guarantee that; a) they are a good match in the image b) all the colours are used.
However, throwing one into the hat.
1. You can take your defined colours from a palette and paint onto a canvas in RGB https://i.imgur.com/iMjZCvw.jpg
2. Then that will convert to indexed (with whatever number of colours) to give a colormap of the defined colors.
3. Anything that goes into that indexed image assumes the properties both indexed and colormap. https://i.imgur.com/ibloavC.jpg
but no guarantee that; a) they are a good match in the image b) all the colours are used.