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

Code Example 1

/* Answer to: "css rgb color" */

/*
  RGB color values are supported in all browsers.

  An RGB color value is specified with: rgb(red, green, blue).

  Each parameter (red, green, and blue) defines the intensity of the
  color as an integer between 0 and 255.

  For example, rgb(0, 0, 255) is rendered as blue, because the blue
  parameter is set to its highest value (255) and the others are set
  to 0.
*/

body {
  background-color: rgba(255, 0, 255); /* Purple */
}

Learn ReactJs, React Native from akashmittal.com