//
//  UIView+Extension.swift
//  Tool_Swift
//
//  Created by 曹云霄 on 2017/2/17.
//  Copyright © 2017年 曹云霄. All rights reserved.

import UIKit

extension UIColor {

    class func RGB(_ r: CGFloat, g:CGFloat, b:CGFloat) -> UIColor {
        return UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: 1)
    }
    
    class func randomColor() -> UIColor {
        let r = CGFloat(arc4random_uniform(256))
        let g = CGFloat(arc4random_uniform(256))
        let b = CGFloat(arc4random_uniform(256))
        return UIColor.RGB(r, g: g, b: b)
    }

}
