Palette.Swatch

public static final class Palette.Swatch
extends Object

java.lang.Object
   ↳ androidx.palette.graphics.Palette.Swatch


Represents a color swatch generated from an image's palette. The RGB color can be retrieved by calling getRgb().

Summary

Public constructors

Swatch(int color, int population)

Public methods

boolean equals(Object o)
int getBodyTextColor()

Returns an appropriate color to use for any 'body' text which is displayed over this Palette.Swatch's color.

float[] getHsl()

Return this swatch's HSL values.

int getPopulation()
int getRgb()
int getTitleTextColor()

Returns an appropriate color to use for any 'title' text which is displayed over this Palette.Swatch's color.

int hashCode()
String toString()

Inherited methods