v7.palette to extract colors from images. now my problem is i am limited to only one swatch, and my question is how to get all the swatches allowing the palette to extract all the colors from the image and using that color .Please help N.B: Everything is working fine,Palette is working fine but with a small collection of colors
public void updateColor(){
final Bitmap bitmap = mImageFetcher.getArtwork(Utils.getAlbumName(),
Utils.getCurrentAlbumId(), Utils.getArtistName());
Palette palette = Palette.generate(bitmap);
// Getting the different types of colors from the Image
Palette.Swatch vibrantSwatch = palette.getVibrantSwatch();
// Adding the colors to the TextViews.
if(vibrantSwatch!=null) {
// Changing the background color of the toolbar to Vibrant Light Swatch
toolbar.setBackgroundDrawable(new ColorDrawable(vibrantSwatch.getRgb()));
if (Build.VERSION.SDK_INT >= 21) { // setStatusBarColor only works above API 21!
getWindow().setStatusBarColor(vibrantSwatch.getRgb());
}
}
}