Questions tagged [android-palette]

Palette is a helper class to extract prominent colors from an image.

Palette is a helper class to extract prominent colors from an image.

A number of colors with different profiles are extracted from the image:

  • Vibrant
  • Vibrant Dark
  • Vibrant Light
  • Muted
  • Muted Dark
  • Muted Light

These can be retrieved from the appropriate getter method.

Android Palette Developers Reference

34 questions
9
votes
4 answers

Android Apply Palette

I am trying to use the palette function of androids material design but I am having some trouble in applying it. I have successfully generated the palette and now I am trying to pass the palette into a function that applies the it. The problem…
Hayes121
  • 283
  • 7
  • 25
7
votes
1 answer

How to actually use a color palette generated by Material Design tool in Android?

I have recently used the material palette generator found at https://material.io/tools/color/ to generate a palette. This tool is an official tool on Material.io, as you can see. It generated several colors - a primary and secondary, including two…
6
votes
3 answers

android.support.v7.graphics.Palette width and height must be > 0

I have some code using the new Palette class and I'm getting these crash reports on Crashlytics saying that the width and height must be > 0. What is odd is that this is how I call the palette code: if( bitmap == null || bitmap.getHeight() <= 0 ||…
casolorz
  • 8,486
  • 19
  • 93
  • 200
5
votes
1 answer

How to solve "Bitmap is not valid" error when I fetch image from online

I am trying to make an app which shows images from online database. but I want to use palette API to get vibrant color from each image. But I think I don't know how to use Bitmap decodeResource method OR Palette. please guide me how to use Bitmap…
5
votes
0 answers

Android Material Palette transparency error

I have recently been playing with Bitmaps and palettes when I encountered the following: java.lang.IllegalArgumentException: background can not be translucent at android.support.v7.graphics.ColorUtils.findMinimumAlpha(ColorUtils.java:90) at…
Daiwik Daarun
  • 3,804
  • 7
  • 33
  • 60
3
votes
2 answers

Missing Number Picker and many other in palette from android studio 3.3?

I am using Android Studio 3.3.2. I didn't find the NumberPicker in the palette which was in Expert tab on older versions of Android Studio. What to do?Screenshot of my palette are given below:
3
votes
0 answers

How can I do color quantization of images in Android?

I want to reduce the color count of an image. Android provides a palette library to build palettes: https://developer.android.com/reference/android/support/v7/graphics/Palette.Builder.html But the Palette Builder only build the palette itself, but…
NeoWang
  • 17,361
  • 24
  • 78
  • 126
3
votes
0 answers

Listening for when Picasso is done downloading an image to use Palette

I wanted to use the Palette library in Android. I am also using Picasso to load images into an imageview. Is there any way of knowing when Picasso is done loading the image so I can get the colors from the image in…
DDukesterman
  • 1,391
  • 5
  • 24
  • 42
3
votes
2 answers

How do I get a Palette for my bitmap once Picasso Loads it?

In October 2014, Jake Wharton wrote Coercing Picasso to Play With Palette. In it, there are 2 methods being pondered: Using a Transformation that generates the palette. The advantage of this is that the palette is generated on Picasso's worker…
copolii
  • 14,208
  • 10
  • 51
  • 80
2
votes
1 answer

Failed to resolve: com.android.support:palette-v7:26.0.1

I am having this error on Android Studio: Error:Failed to resolve: com.android.support:palette-v7:26.0.1 Install Repository and sync project Open File Show in Project Structure dialog When I click 'Install Repository and sync project' nothing…
code8x
  • 1,780
  • 12
  • 15
2
votes
2 answers

Getting Null Pointer exception while using Palette API getRgb() method

Am not able figure out the solution for this problem Please help me. Am trying to change the color of the toolbar by extracting the color in an image inside the collapseToolbarLayout here is my java code public class ToolbarColorDynamic extends…
basavaraj_S
  • 1,333
  • 2
  • 12
  • 20
2
votes
1 answer

How to use Palette API to generate color dynamically?

Looking around the website other tutorials found out a nice option applying material design to android app, which is picking a cardView action area color depending on the picture viewed in the card. In this toturial, they are importing the images…
madnomad10011
  • 341
  • 2
  • 6
  • 19
2
votes
3 answers

Palette Library: How to add transparency to Palette Swatch Color?

How can I add transparency value to a palette's swatch? Like I am adding the color(swatch.getRGB()) to a linear layout, It shows solid color. And I don't want to use alpha as it will make other items in layout transparent too. My code…
WideFide
  • 335
  • 1
  • 3
  • 18
1
vote
1 answer

Angular 5, get colors from an image

I have an android app that uses android.support.v7.graphics.Palette to get the color info from a dynamic image and then customize the layout of the activity to use mutated colors from the image. My question is, does Angular 5 have anything…
Patrick Keogh
  • 227
  • 4
  • 11
1
vote
0 answers

Palette library not returning color code which i want. why?

I have created an application which first capture an image then apply color of vibrant palette to text. Here is my code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Juned Khatri
  • 451
  • 5
  • 8
1
2 3