Check out example codes for "color picker css". It will help you in understanding the concepts better.
Code Example 1
Code Example 2
color pick by osp pro.
Code Example 3
paletton is what you want It even gives you presets based on the colour rules See below link
Learn ReactJs, React Native from akashmittal.com