skydoves / ColorPickerView

🎨 Android colorpicker for getting colors from any images by tapping on the desired color.
Apache License 2.0
1.6k stars 211 forks source link

ColorPicker.setInitialColor issue #74

Closed HafizAwaiskhan closed 3 years ago

HafizAwaiskhan commented 3 years ago

Describe the Bug: I am using an Image Drawable and set Its Initial Color but its is not showing the flag on that place where it should show . public void setPaletteDrawable(Drawable drawable){ //Choosing image from Drawable }

public void setInitialColor(@ColorInt final int color) { }

Expected Behavior:

we can choose any Image from Drawable and when we will call setInitialColor() method it should show the exact position on Drawable. the Drawable I am using https://drive.google.com/file/d/1B5R4irIsAmELmlPzHp4QE3mJYtK1_WsU/view?usp=sharing

skydoves commented 3 years ago

setInitialColor will not work correctly If you are using a custom drawable palette.

This method will not work if the default palette drawable is not {@link ColorHsvPalette}.