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

Code Example 1

Button(action: {self.buttonTapped()}) {
  Text("Button")
   		.padding(.all, 12)
  		.foregroundColor(.white)
  		.background(Color.red)
}

Learn ReactJs, React Native from akashmittal.com