score
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.
Return
Colors sorted by suitability for a UI theme. The most suitable color is the first item, the least suitable is the last. There will always be at least one color returned. If all the input colors were not suitable for a theme, a default fallback color will be provided, Google Blue.
Parameters
colors To Population
map with keys of colors and values of how often the color appears, usually from a source image.
max Color Count
max count of colors to be returned in the list.
fallback Color Argb
color to be returned if no other options available.
filter
whether to filter out undesirable combinations.