A convenient way to convert hex strings to UIColor or NSColor. IRHexColor support RGB and ARGB hex strings. In addition, IRHexColor will cache hex color for reusing which can improve performance.
let red = UIColor.hexColor("FF0000")
let green = UIColor.hexColor("#00FF00")
let blue = UIColor.hexColor("0000FF")
// ARGB hex string
let aquaAlpha = UIColor.hexColor("#10D4F2E7")
let yellowAlpha = UIColor.hexColor("08FFFF00")
Set cache count limit
// default is 100
UIColor.cacheCountLimit = 200
pod 'IRHexColor'
Drag and drop IRHexColor.swift file into your project