Check out example codes for "color() in flutter". It will help you in understanding the concepts better.
Code Example 1
// Color() widget can be used in the following way: //where 123456 is the hex color code without the '#' Color myHexColor = Color(0xff123456)
Learn ReactJs, React Native from akashmittal.com