Working from a new project: iOS > Application > Game > SpriteKit, Swift, iPhone
Here I\'ve written a function in my G
See from the source code you should use CGFloat instead of Float

this should work
func colorize (hex: Int, alpha: Double = 1.0) -> UIColor {
let red = Double((hex & 0xFF0000) >> 16) / 255.0
let green = Double((hex & 0xFF00) >> 8) / 255.0
let blue = Double((hex & 0xFF)) / 255.0
var color: UIColor = UIColor( red: CGFloat(red), green: CGFloat(green), blue: CGFloat(blue), alpha:CGFloat(alpha) )
return color
}