UIColor

class UIColor : NSObject, NSSecureCoding, NSCopying
  • Implements GradientColor protocol, by default current color is startColor for gradient defination

    Declaration

    Swift

    public var startColor: UIColor { get }
  • System colors

    See more

    Declaration

    Swift

    public struct System
  • Creates color from hexadecimal string

    Example input string cab be with # prefix i.e. #FF00FF or FF00FF

    Declaration

    Swift

    public convenience init(_ hexString: String, alpha: CGFloat = 1.0)

    Parameters

    hexString

    Valid hexadecimal string

    alpha

    Alpha value of color, default is 1.0

  • hexadecimal (a hex triplet) representation of current color.

    Declaration

    Swift

    public var hexString: String { get }