from
fun Palette.Companion.from(bitmap: ImageBitmap, scale: Boolean = true, block: Palette.Builder.() -> Unit = {}): Palette.Builder
Creates a Palette.Builder from an ImageBitmap.
This extension function extracts and scales the pixels from the bitmap, then creates a builder configured with the appropriate region coordinate space.
Return
A Palette.Builder configured for the given bitmap.
Parameters
bitmap
The ImageBitmap to extract colors from.