themeColors

fun Palette.themeColors(fallback: Color, desired: Int = DEFAULT_DESIRED_COLORS, filter: Boolean = true): List<Color>

Rank the swatches of this Palette by how well they would seed a UI theme, using the same scoring Android applies to wallpapers.

kmpalette found the swatches, this puts them through Material Color Utilities' Score, which drops the washed out and barely used ones and spreads the survivors across the hue circle.

Receiver

the Palette whose swatches are scored.

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 none of the swatches suit a theme, the list holds only fallback.

Parameters

fallback

color to be returned if no other options available.

desired

The number of colors to return.

filter

whether to filter out undesirable combinations.