In Objective-C, we use this code to set RGB color codes for views:
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0x
button.layer.backgroundColor = UIColor(red: 112.0/255, green: 86.0/255, blue: 164.0/255, alpha: 1.0).cgColor