Check out example codes for "rgb gray color". It will help you in understanding the concepts better.

Code Example 1

rgb(128,128,128)  /* gray */  Hex  #808080

Code Example 2

RGB(220,220,220)

Learn ReactJs, React Native from akashmittal.com