themeColor

fun ImageBitmap.themeColor(fallback: Color, filter: Boolean = true, maxColors: Int = DEFAULT_QUANTIZE_MAX_COLORS): Color

Determine the most suitable color in a ImageBitmap for a UI theme.

Receiver

the ImageBitmap to extract colors from.

Return

The most suitable color for a UI theme.

Parameters

fallback

color to be returned if no other options available.

filter

whether to filter out undesirable combinations.

maxColors

The number of colors to divide the image into.