Check out example codes for "how to use hexadecimal color in flutter". It will help you in understanding the concepts better.

Code Example 1

Color myColor = Color(0xff123456) 

// where 123456 is your hex color code and
// 0xff is the opacity value and can be changed.

Learn ReactJs, React Native from akashmittal.com