I am creating a physical mosaic from a photograph, where each mosaic tile will correspond to a pixel of the (scaled down) original picture. The problem is: my tile color selection is limited, with the additional limitation of having a variable and even more limited number of tiles for each color. Hence, I need to stick to given color proportions.
for some reason I need to convert a picture to a 16-color palette. While the conversion itself is nothing special, I need the final result to stick to a well-defined color proportion. This means, for example, that I need the final picture to contain (e.g.) 15% of color #1 from the 16-color palette, 3% of color #2 and so on. How can I achieve this?