Package-level declarations
Types
A class which stores and caches the result of any calculated dominant colors.
Represents the result of a palette generation operation.
A state object that generates a Palette from an ImageBitmap using loader.
Properties
Returns a color value in the RGB color space which represents the color of this Swatch
The default number of results retained by the PaletteState and DominantColorState caches.
Returns an appropriate color to use for any 'title' text which is displayed over this Swatch's color. This color is guaranteed to have sufficient contrast.
Functions
Returns an appropriate color to use for any 'body' text which is displayed over this Swatch's color. This color is guaranteed to have sufficient contrast.
Creates a Palette.Builder from an ImageBitmap.
Generates a Palette from this ImageBitmap.
Returns the selected swatch for the given target from the palette, or null if one could not be found.
Returns the selected swatch for the given target from the palette, or null if one could not be found.
Create a DominantColorState which will be remembered across compositions. Then can be used to generate a dominant color from an ImageBitmap.
Generates and remembers a Palette from an ImageBitmap loaded by the provided loader.
Generates and remembers a Palette from this ImageBitmap across compositions.
Creates a PaletteState that will be remembered across compilation and can be used to generate a Palette from an ImageBitmap.
Creates a PaletteState that will be remembered across compilation and can be used to generate a Palette from an ImageBitmap using loader.
Returns an appropriate color to use for any 'title' text which is displayed over this Swatch's color. This color is guaranteed to have sufficient contrast.