blob: cbe84e9b4bbefd58968ec99b1eae7a5d83751e92 [file] [log] [blame]
// Signature format: 3.0
package androidx.palette.graphics {
public final class Palette {
method public static androidx.palette.graphics.Palette.Builder from(android.graphics.Bitmap);
method public static androidx.palette.graphics.Palette from(java.util.List<androidx.palette.graphics.Palette.Swatch>);
method @Deprecated public static androidx.palette.graphics.Palette generate(android.graphics.Bitmap);
method @Deprecated public static androidx.palette.graphics.Palette generate(android.graphics.Bitmap, int);
method @Deprecated public static android.os.AsyncTask<android.graphics.Bitmap,java.lang.Void,androidx.palette.graphics.Palette> generateAsync(android.graphics.Bitmap, androidx.palette.graphics.Palette.PaletteAsyncListener);
method @Deprecated public static android.os.AsyncTask<android.graphics.Bitmap,java.lang.Void,androidx.palette.graphics.Palette> generateAsync(android.graphics.Bitmap, int, androidx.palette.graphics.Palette.PaletteAsyncListener);
method @ColorInt public int getColorForTarget(androidx.palette.graphics.Target, @ColorInt int);
method @ColorInt public int getDarkMutedColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getDarkMutedSwatch();
method @ColorInt public int getDarkVibrantColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getDarkVibrantSwatch();
method @ColorInt public int getDominantColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getDominantSwatch();
method @ColorInt public int getLightMutedColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getLightMutedSwatch();
method @ColorInt public int getLightVibrantColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getLightVibrantSwatch();
method @ColorInt public int getMutedColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getMutedSwatch();
method public androidx.palette.graphics.Palette.Swatch? getSwatchForTarget(androidx.palette.graphics.Target);
method public java.util.List<androidx.palette.graphics.Palette.Swatch> getSwatches();
method public java.util.List<androidx.palette.graphics.Target> getTargets();
method @ColorInt public int getVibrantColor(@ColorInt int);
method public androidx.palette.graphics.Palette.Swatch? getVibrantSwatch();
}
public static final class Palette.Builder {
ctor public Palette.Builder(android.graphics.Bitmap);
ctor public Palette.Builder(java.util.List<androidx.palette.graphics.Palette.Swatch>);
method public androidx.palette.graphics.Palette.Builder addFilter(androidx.palette.graphics.Palette.Filter);
method public androidx.palette.graphics.Palette.Builder addTarget(androidx.palette.graphics.Target);
method public androidx.palette.graphics.Palette.Builder clearFilters();
method public androidx.palette.graphics.Palette.Builder clearRegion();
method public androidx.palette.graphics.Palette.Builder clearTargets();
method public androidx.palette.graphics.Palette generate();
method public android.os.AsyncTask<android.graphics.Bitmap,java.lang.Void,androidx.palette.graphics.Palette> generate(androidx.palette.graphics.Palette.PaletteAsyncListener);
method public androidx.palette.graphics.Palette.Builder maximumColorCount(int);
method public androidx.palette.graphics.Palette.Builder resizeBitmapArea(int);
method @Deprecated public androidx.palette.graphics.Palette.Builder resizeBitmapSize(int);
method public androidx.palette.graphics.Palette.Builder setRegion(@Px int, @Px int, @Px int, @Px int);
}
public static interface Palette.Filter {
method public boolean isAllowed(@ColorInt int, float[]);
}
public static interface Palette.PaletteAsyncListener {
method public void onGenerated(androidx.palette.graphics.Palette?);
}
public static final class Palette.Swatch {
ctor public Palette.Swatch(@ColorInt int, int);
method @ColorInt public int getBodyTextColor();
method public float[] getHsl();
method public int getPopulation();
method @ColorInt public int getRgb();
method @ColorInt public int getTitleTextColor();
}
public final class Target {
method public float getLightnessWeight();
method @FloatRange(from=0, to=1) public float getMaximumLightness();
method @FloatRange(from=0, to=1) public float getMaximumSaturation();
method @FloatRange(from=0, to=1) public float getMinimumLightness();
method @FloatRange(from=0, to=1) public float getMinimumSaturation();
method public float getPopulationWeight();
method public float getSaturationWeight();
method @FloatRange(from=0, to=1) public float getTargetLightness();
method @FloatRange(from=0, to=1) public float getTargetSaturation();
method public boolean isExclusive();
field public static final androidx.palette.graphics.Target DARK_MUTED;
field public static final androidx.palette.graphics.Target DARK_VIBRANT;
field public static final androidx.palette.graphics.Target LIGHT_MUTED;
field public static final androidx.palette.graphics.Target LIGHT_VIBRANT;
field public static final androidx.palette.graphics.Target MUTED;
field public static final androidx.palette.graphics.Target VIBRANT;
}
public static final class Target.Builder {
ctor public Target.Builder();
ctor public Target.Builder(androidx.palette.graphics.Target);
method public androidx.palette.graphics.Target build();
method public androidx.palette.graphics.Target.Builder setExclusive(boolean);
method public androidx.palette.graphics.Target.Builder setLightnessWeight(@FloatRange(from=0) float);
method public androidx.palette.graphics.Target.Builder setMaximumLightness(@FloatRange(from=0, to=1) float);
method public androidx.palette.graphics.Target.Builder setMaximumSaturation(@FloatRange(from=0, to=1) float);
method public androidx.palette.graphics.Target.Builder setMinimumLightness(@FloatRange(from=0, to=1) float);
method public androidx.palette.graphics.Target.Builder setMinimumSaturation(@FloatRange(from=0, to=1) float);
method public androidx.palette.graphics.Target.Builder setPopulationWeight(@FloatRange(from=0) float);
method public androidx.palette.graphics.Target.Builder setSaturationWeight(@FloatRange(from=0) float);
method public androidx.palette.graphics.Target.Builder setTargetLightness(@FloatRange(from=0, to=1) float);
method public androidx.palette.graphics.Target.Builder setTargetSaturation(@FloatRange(from=0, to=1) float);
}
}