Swift UIColor utilities : Random Hex colour codes, Random UIColor

Simple to use swift functions which are very useful in development and testing.

1. Generating random UIColor in Swift: Function returns random UIColor each time

func randomUIColor(alpha:CGFloat!)-> UIColor
    return  UIColor(red: CGFloat.random(in: 0...1), green: CGFloat.random(in: 0...1), blue: CGFloat.random(in: 0...1), alpha: alpha)

2. Random HEX Color code in Swift 3: Function returns random 3 char Hex colour code each time.

Read more