lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

androidx.palette.graphics

Classes

Palette

A helper class to extract prominent colors from an image.

Target

A class which allows custom selection of colors in a Palette's generation.

Extension functions summary

For android.graphics.Bitmap
Palette.Builder

Create a Palette.Builder from this bitmap.

For Palette
operator Palette.Swatch?
Palette.get(target: Target)

Returns the selected swatch for the given target from the palette, or null if one could not be found.

Extension functions

buildPalette

inline fun Bitmap.buildPalette(): Palette.Builder

Create a Palette.Builder from this bitmap.

See Also

get

inline operator fun Palette.get(target: Target): Palette.Swatch?

Returns the selected swatch for the given target from the palette, or null if one could not be found.