I understand that the Palette's
Palette.from(bitmap).generate();
method picks by default 16 colors and then finds the best fit for the 6 main color swatches (vibrant, dark vibrant etc.)
I can increase the number of generated colors with
Palette.from(bitmap).maximumColorCount(number).generate();
and it has a higher chance of finding a good color for the different swatches.
But there is no explanation about how these 16+ colors are picked? On what criteria? Why do I get 6 different "main" swatches when I generate different amount of colors, why doesn't it just search for the best fit from the image directly?