iyegoroff / react-native-reanimated-color-picker

Natively animated HSV color picker for iOS & Android
MIT License
28 stars 3 forks source link

Programatically change color #1

Open drewandre opened 4 years ago

drewandre commented 4 years ago

Hi, thanks for this helpful library. I was wondering how you could programatically change the color of the color wheel since there is no javascript api for this other than initialHue and initialSaturation? The use case here is if you save a color swatch and want to switch the color picker back to that color (same x/y coordinates) on press. Any pointers?

iyegoroff commented 4 years ago

Hi @drewandre. Currently there is only one option to change color programatically - remounting the component with new 'initial' values. The way to go is to add imperative methods like 'setHue' etc. - but this would require some rewrite.