Dominant Color State
constructor(defaultColor: Color, defaultOnColor: Color, cacheSize: Int = DEFAULT_CACHE_SIZE, coroutineContext: CoroutineContext = Dispatchers.Default, isSwatchValid: (Palette.Swatch) -> Boolean = { true }, builder: Palette.Builder.() -> Unit = {})
Parameters
T
The type of the input to calculate the dominant color from.
default Color
The default color, which will be used if calculateDominantColor fails to calculate a dominant color
cache Size
The size of the LruCache used to store recent results. Pass 0 to disable the cache.
coroutine Context
The CoroutineContext used to launch the coroutine.
builder
A lambda which allows customization of the Palette.Builder used to generate the Palette from the input T