     }
     
     //  Returns random UIColor with random alpha(default: false)
+    
+    /// 随机颜色
+    ///
+    /// - Parameter isRandomAlpha: 透明度随机
+    /// - Returns: 返回随机颜色
     public static func m_randomColor(_ isRandomAlpha: Bool = false) -> UIColor {
         func random() -> CGFloat {
             let upper = 255;

        }
    }
    
    // init method with hex int and alpha(default: 1)
    public convenience init(rgbHex: Int, alpha: CGFloat = 1) {
        let red = (rgbHex >> 16) & 0xFF
        let green = (rgbHex >> 8) & 0xFF

import UIKit

extension UIColor {
    
    /// init
    ///
    /// - Parameters:
    ///   - r: RGB values from 0 to 255, instead of 0 to 1.
    ///   - g: RGB values from 0 to 255, instead of 0 to 1.
    ///   - b: RGB values from 0 to 255, instead of 0 to 1.
    ///   - a: alpha(default:1)
    public convenience init(r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat = 1) {
        self.init(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a)
    }
    
    /// init?
    ///
    /// - Parameters:
    ///   - hexString: hex string, ex: "0x111111","#111111"
    ///   - alpha: alpha(default:1)
    public convenience init?(hexString: String, alpha: CGFloat = 1.0) {
        var formatted = hexString.replacingOccurrences(of: "0x", with: "")
        formatted = formatted.replacingOccurrences(of: "#", with: "")
