rememberThemeColor

fun rememberThemeColor(image: ImageBitmap, fallback: Color = MaterialTheme.colorScheme.primary, filter: Boolean = true, maxColors: Int = DEFAULT_QUANTIZE_MAX_COLORS): Color

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

Return

The most suitable color for a UI theme.

Parameters

image

the ImageBitmap to extract colors from.

fallback

color to be returned if no other options available. Defaults to primary color.

filter

whether to filter out undesirable combinations.

maxColors

The number of colors to divide the image into.