rememberThemeColors
fun rememberThemeColors(image: ImageBitmap, fallbackColor: Color = MaterialTheme.colorScheme.primary, maxColors: Int = MAX_COLORS_DEFAULT, filter: Boolean = true, numberOfColors: Int = DESIRED_COLORS_DEFAULT): List<Color>
Creates a state holder for a list of theme colors derived from an ImageBitmap.
Return
A list of colors suitable for a UI theme, with the most suitable color first.
Parameters
image
The ImageBitmap to extract colors from.
fallbackColor
The color to return if no suitable theme colors are found. Defaults to the primary color of the Material theme.
maxColors
The maximum number of colors to extract from the image.
filter
Whether to filter out undesirable color combinations.
numberOfColors
Desired number of colors to return.