     self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: alpha)
   }
   
+  /// Create an UIColor object with hexadecimal string.
+  /// - Parameters:
+  ///   - hexString: hexadecimal string ("#35AF46", "25B767")
+  ///   - alpha: opacity value of the color object
   convenience init(hexString: String, alpha: CGFloat = 1) {
     let string = hexString.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
     let scanner = Scanner(string: string)

    return (red: r, green: g, blue: b, alpha: a)
  }
  
  var rgbComponents: (red: Int, green: Int, blue: Int) {
    let comps = rgbaComponents
    return (red: Int(comps.red * 255.0), green: Int(comps.green * 255.0), blue: Int(comps.blue * 255.0))
  }
  
  var hexString: String {
    let components: [Int] = {
      let c = cgColor.components!

import UIKit

public extension UIColor {
  
  /// Return a random color
  static var random: UIColor {
    let red = (0...255).randomElement()!
    let green = (0...255).randomElement()!
