This extension brings some convenience initializers into UIColor object and useful methods and calculated variables.
let red = UIColor(string: "#FF0000")
let green = UIColor(hex: 0x00FF00)
let hex = UIColor.blue.asInt
// hex = 255
let string = UIColor.yellow.asHexString
// string = "#ffff00"
let lightOrange = UIColor.orange.lighterColor
// "#ff9f3f"
let darkOrange = UIColor.orange.darkerColor
// "#bf5f00"
let greenSea = UIColor.flatGreenSea
let veryBerry = UIColor.flatVeryBerry
Add UIColor.swift
into your project