UIColor
class UIColor : NSObject, NSSecureCoding, NSCopying
Collection of all UIColor Extensions.
Subspec: Extensions/UIColorExtension
-
Returns an image of the color.
Declaration
Swift
public var image: UIImage { get }
-
Initialize and return a UIColor object that corresponds to the given hex string
Declaration
Swift
public convenience init(hexString: String)Parameters
hexString6 digits color hex string
-
Darkens the receiver color by blending it with black color using given weight.
Declaration
Swift
public func darken(by weight: CGFloat) -> UIColorParameters
weightProportional weight that should be given to blend color, specified as value from 0.0 to 1.0.
Return Value
Darkened color.
-
Brightens the receiver color by blending it with white color using given weight.
Declaration
Swift
public func brighten(by weight: CGFloat) -> UIColorParameters
weightProportional weight that should be given to blend color, specified as value from 0.0 to 1.0.
Return Value
Brightened color.
-
Fades the current color to the target color.
Declaration
Swift
public func fadeColor(targetColor: UIColor, percent: CGFloat) -> UIColorParameters
targetColorTarget color to transition to.
percentPercent of the fade.
Return Value
The faded color.
-
Blend the receiver with specified color using given weight.
Declaration
Swift
public func blend(with blendColor: UIColor, weight: CGFloat) -> UIColorParameters
blendColorColor to blend with.
weightProportional weight that should be given to blend color, specified as value from 0.0 to 1.0.
Return Value
Blended color.
UIColor Extension Reference