rememberGeneratePalette
Generates and remembers a Palette from this ImageBitmap across compositions.
The palette generation is triggered in a LaunchedEffect and the result is remembered across recompositions. The result starts as PaletteResult.Loading and transitions to either PaletteResult.Success or PaletteResult.Error.
Return
A PaletteResult representing the current state of palette generation.
Parameters
The CoroutineContext to use for palette generation. Defaults to Dispatchers.Default.
Optional lambda to configure the Palette.Builder before generation.
Generates and remembers a Palette from an ImageBitmap loaded by the provided loader.
This composable first loads the bitmap using the provided loader, then generates a palette from it. The result is remembered across recompositions. The result starts as PaletteResult.Loading and transitions to either PaletteResult.Success or PaletteResult.Error.
Return
A PaletteResult representing the current state of palette generation.
Parameters
A suspend lambda that loads and returns an ImageBitmap.
The CoroutineContext to use for palette generation. Defaults to Dispatchers.Default.
Optional lambda to configure the Palette.Builder before generation.