Check out example codes for "how to give 2 different background color css". It will help you in understanding the concepts better.

Code Example 1

background: linear-gradient(<angle>, color1 color1-stop-at, color2 color2-start-at);

Code Example 2

background: repeating-linear-gradient(#74ABDD, #74ABDD 49.9%, #498DCB 50.1%, #498DCB 100%);

Learn ReactJs, React Native from akashmittal.com