UIColor
public extension UIColor
-
Init color from 0-255 RGB components
Declaration
Swift
convenience init(red: Int, green: Int, blue: Int) -
Init color from hex value
Declaration
Swift
convenience init(hex: Int) -
Return lighter color. 1.0 - white, 0.0 - same as receiver.
Declaration
Swift
func lighterColor(amount: CGFloat) -> UIColor
-
Return average color by combining averages for
red,green,blueandalphacomponents.Declaration
Swift
static func hexAverage(colors: [UIColor]) -> UIColor -
Returns average color by combining averages of
hue,saturation,brightnessandalphacomponents. This one is close to human understanable average.Declaration
Swift
static func hueAverage(colors: [UIColor]) -> UIColor
UIColor Extension Reference