QuadFlask / colorpicker

🍭color picker for android
1.22k stars 219 forks source link

Add minimumWheelLightness #135

Open thirstycoda opened 1 year ago

thirstycoda commented 1 year ago

Firstly thanks for this library. It's great!

I'm using it as a text color picker. The default text color is black. The problem I had was when the user opens the text color picker for the first time, all the circles on the wheel were black as the wheel was set to the current text color. Users had to drag the lightness slider before revealing the colors they can choose from which wasn't intuitive.

This PR tackles this problem by adding an optional attribute to the ColorPickerView which will show the wheel colors at full lightness, except for the circle currently selected, when the lightness value drops below it. The idea is that when the lightness value is as low as 0.01 for example, the colors are indistinguishable so offering lots of buttons that effectively do the same thing is not that useful.

Hopefully this will help others too (https://github.com/QuadFlask/colorpicker/issues/109)

I also made changes to get this building with Jitpack