godaddy / compose-color-picker

Jetpack Compose Android Color Picker 🎨
MIT License
369 stars 23 forks source link

Ability to change color programmatically #18

Closed sproctor closed 1 year ago

sproctor commented 2 years ago

It would be nice to be able to control the state from outside of the widget. In my use case, I have a text entry that changes the current color.

keyflare commented 2 years ago

Voted this. Current implementation violates state hoisting principle, which underlies the Jetpack Compose. Composables should be stateless

Stephen-Hamilton-C commented 1 year ago

Could we also get this for ClassicColorPicker? This would let me make a text box that the user can input their own color codes into and see it update on the color picker. Looking at the PR, it looks like this only applied to HarmonyColorPicker. My current implementation is using HarmonyColorPicker with harmonyMode set to NONE. This works, but it's not as visually appealing as ClassicColorPicker imo