rememberDominantColorState
Create a DominantColorState which will be remembered across compositions. Then can be used to generate a dominant color from an ImageBitmap.
Return
A DominantColorState which can be used to generate a dominant color from a ImageBitmap.
Parameters
The default color, which will be used if Palette.generate fails.
The default color to use on defaultColor.
The size of the LruCache used to store recent results. Pass 0
to disable.
The CoroutineContext used to launch the coroutine.
A lambda which allows filtering of the calculated Palette.Swatch.
A lambda which allows customization of the Palette.Builder used to generate the Palette.
Create a DominantColorState which will be remembered across compositions. Then can be used to generate a dominant color from an ImageBitmap.
Return
A DominantColorState which can be used to generate a dominant color from a ImageBitmap.
Parameters
The ImageBitmapLoader to use to load the ImageBitmap.
The default color, which will be used if Palette.generate fails.
The default color to use on defaultColor.
The size of the LruCache used to store recent results. Pass 0
to disable.
The CoroutineContext used to launch the coroutine.
A lambda which allows filtering of the calculated Palette.Swatch.
A lambda which allows customization of the Palette.Builder used to generate the Palette.