Score

Given a large set of colors, remove colors that are unsuitable for a UI theme, and rank the rest based on suitability.

Enables use of a high cluster count for image quantization, thus ensuring colors aren't muddied, while curating the high cluster count to a much smaller number of appropriate choices.

Functions

Link copied to clipboard
open fun score(colorsToPopulation: Map<Integer, Integer>): List<Integer>
open fun score(colorsToPopulation: Map<Integer, Integer>, maxColorCount: Int): List<Integer>
open fun score(colorsToPopulation: Map<Integer, Integer>, maxColorCount: Int, fallbackColorArgb: Int): List<Integer>

open fun score(colorsToPopulation: Map<Integer, Integer>, maxColorCount: Int, fallbackColorArgb: Int, filter: Boolean): List<Integer>
Given a map with keys of colors and values of how often the color appears, rank the colors based on suitability for being used for a UI theme.