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

Code Example 1

//Color using RGB
Color col = Color(r, g, b);
//Color using RGBA
Color col = Color(r, g, b, a);

//r, g, b and a can be a float between 0.0 and 1 or 
//an int between 0 and 255
//The format must be consistant across all values

Learn ReactJs, React Native from