UIColor

  • Undocumented

    Declaration

    Swift

    convenience init(red: Int, green: Int, blue: Int)
  • Undocumented

    Declaration

    Swift

    convenience init(rgb: Int)
  • Undocumented

    Declaration

    Swift

    convenience init(hexString: String)
  • Undocumented

    Declaration

    Swift

    public func hexString(_ includeAlpha: Bool = true) -> String
  • init method with RGB values from 0 to 255, instead of 0 to 1. With alpha(default:1)

    Declaration

    Swift

    public convenience init(r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat = 1)
  • init method with hex string and alpha(default: 1)

    Declaration

    Swift

    public convenience init?(hexString: String, alpha: CGFloat = 1.0)
  • init method from Gray value and alpha(default:1)

    Declaration

    Swift

    public convenience init(gray: CGFloat, alpha: CGFloat = 1)
  • Red component of UIColor (get-only)

    Declaration

    Swift

    public var redComponent: Int
  • Green component of UIColor (get-only)

    Declaration

    Swift

    public var greenComponent: Int
  • blue component of UIColor (get-only)

    Declaration

    Swift

    public var blueComponent: Int
  • Alpha of UIColor (get-only)

    Declaration

    Swift

    public var alpha: CGFloat
  • Returns random UIColor with random alpha(default: false)

    Declaration

    Swift

    public static func random(randomAlpha: Bool = false) -> UIColor