duanhong169 / ColorPicker

🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).
Apache License 2.0
361 stars 82 forks source link

Observer callback and initial color value of xFF000000 #3

Closed faridzidan closed 5 years ago

faridzidan commented 5 years ago

Using ColorPickerView in a xml layout with enableAlpha="false" and initializing view by calling setInitialColor() with opaque Black color #FF000000

After that, observer always invokes callback with color #FF000000 no matter where user taps on the color wheel to pick colors.

User has to tap on the seek bar for the observer callback to actually change the color from black.

faridzidan commented 5 years ago

This is confusing to the a user. I suggest to reset luminosity to 100% when a user taps on the wheel since the wheel is showing 100% luminosity colors.

duanhong169 commented 5 years ago

This is by design because I want to preserve the values from the sliders (the 'luminosity' as well as the 'alpha'). The design refers to the color picker from Xcode, but the difference is that it changes the color wheel when you seeking the 'luminosity' seek bar, the reason why I didn't implement this is that I want to make the color wheel independent on the sliders. This is really confusing but I think it's acceptable because when a user taps on the wheel, the slider's color will change which can catch the user's attention. I will think further about this.