button.backgroundColor = UIColor.blue
Or any other color: red, green, yellow ,etc.
red
green
yellow
Another option is RGBA color:
button.backgroundColor = UIColor(red: 0.4, green: 1.0, blue: 0.2, alpha: 0.5)
Try this, you need to add the 255 like so:
255
button.backgroundColor = UIColor(red: 102/255, green: 250/255, blue: 51/255, alpha: 0.5)
Update for xcode 8 and swift 3, specify common colors like:
the Color() has been removed.
Color()