Check out example codes for "jcolorchooser in java". It will help you in understanding the concepts better.

Code Example 1

Color choice = JColorChooser.showDialog(this,"Select a color",initialcolor);

Learn ReactJs, React Native from akashmittal.com