I\'m creating a color object using the following code.
curView.backgroundColor = [[UIColor alloc] initWithHue:229 saturation:40 brightness:75 alpha:1];
         
        
Using HandyUIKit makes this really easy:
import HandyUIKit    
let color = UIColor(red: 0.1, green: 0.2, blue: 0.3, alpha: 0.4)
// get any of the rgba values
color.rgba.red    // => 0.1
color.rgba.green  // => 0.2
color.rgba.blue   // => 0.3
color.rgba.alpha  // => 0.4
There is also a similar option to get hsba values:
let color = UIColor(hue: 0.1, saturation: 0.2, brightness: 0.3, alpha: 0.4)
// you can get any of the hsba values, too
color.hsba.hue         // => 0.1
color.hsba.saturation  // => 0.2
color.hsba.brightness  // => 0.3
color.hsba.alpha       // => 0.4
Simply install it using Carthage and you're good to go.
I hope it helps!