Issue
How can I build a color picker as given in the image using android? when an indicator is placed on a color I should be able to get the RGB value.
Solution
I found this library and it worked. We can get the RGB value from this as follows.
picker.setOnColorChangedListener(new ColorPicker.OnColorChangedListener() {
@Override
public void onColorChanged(int color) {
String hexColor = String.format("#%06X", (0xFFFFFF & color));
int red = Color.red(color);
int green = Color.green(color);
int blue = Color.blue(color);
Log.d("Color2", "" + hexColor+" ,"+"R:"+red+" ,"+"G:"+green+" ,"+"B:"+blue+" ,");
}
});
Answered By - Krishan Madushanka