         return UIColor(red: r, green: g, blue: b, alpha: 1)
     }
     
+    /**
+     Convert UIColor object to Hex Color code
+     
+     - returns: hex color code in string.
+     */
     func hexString() -> String {
         let rgbaT = self.colorComponents()
         let r: Int = Int(rgbaT.red * 255)

        return "#\(red)\(green)\(blue)"
    }
    

    func colorComponents() -> ColorComponents {
        
        var r: CGFloat = 0


public extension UIColor{
    
    /**
     Create UIColor from HEX string
     
     - parameter hexString: hex color code
     
     - returns: UIColor object
     */
    func colorFromHexString(hexString:String!)->UIColor?
    {
        var rgbValue:UInt64 = 0;
