rememberThemeColors

fun rememberThemeColors(image: ImageBitmap, fallback: Color = MaterialTheme.colorScheme.primary, maxColors: Int = DEFAULT_QUANTIZE_MAX_COLORS, filter: Boolean = true, desired: Int = DEFAULT_DESIRED_COLORS): List<Color>

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

Return

The most suitable colors 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.

maxColors

The number of colors to divide the image into.

filter

whether to filter out undesirable combinations.

desired

The number of colors to return.