Android APIs
public static abstract class

Palette.Generator

extends Object
java.lang.Object
   ↳ android.support.v7.graphics.Palette.Generator

Class Overview

Extension point for Palette which allows custom processing of the list of Palette.Swatch instances which represent an image.

You should do as much processing as possible during the generate(java.util.List) method call. The other methods in this class may be called multiple times to retrieve an appropriate Palette.Swatch.

Usage of a custom Palette.Generator is done with generator(Generator) as so:

 Generator customGenerator = ...;
 Palette.from(bitmap).generator(customGenerator).generate();
 

Summary

Public Constructors
Palette.Generator()
Public Methods
abstract void generate(List<Palette.Swatch> swatches)
This method will be called with the Palette.Swatch that represent an image.
Palette.Swatch getDarkMutedSwatch()
Return a muted and dark Palette.Swatch
Palette.Swatch getDarkVibrantSwatch()
Return a dark and vibrant Palette.Swatch
Palette.Swatch getLightMutedSwatch()
Return a muted and light Palette.Swatch
Palette.Swatch getLightVibrantSwatch()
Return a light and vibrant Palette.Swatch
Palette.Swatch getMutedSwatch()
Return a muted Palette.Swatch
Palette.Swatch getVibrantSwatch()
Return the most vibrant Palette.Swatch
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Palette.Generator ()

Public Methods

public abstract void generate (List<Palette.Swatch> swatches)

This method will be called with the Palette.Swatch that represent an image. You should process this list so that you have appropriate values when the other methods in class are called.

This method will probably be called on a background thread.

public Palette.Swatch getDarkMutedSwatch ()

Return a muted and dark Palette.Swatch

public Palette.Swatch getDarkVibrantSwatch ()

Return a dark and vibrant Palette.Swatch

public Palette.Swatch getLightMutedSwatch ()

Return a muted and light Palette.Swatch

public Palette.Swatch getLightVibrantSwatch ()

Return a light and vibrant Palette.Swatch

public Palette.Swatch getMutedSwatch ()

Return a muted Palette.Swatch

public Palette.Swatch getVibrantSwatch ()

Return the most vibrant Palette.Swatch