Model
public enum Model
Model is an enum for describing and converting color models.
-
Red, Green, Blue
Declaration
Swift
case rgb(CGFloat, CGFloat, CGFloat)
-
Hue, Saturation, Lightness
Declaration
Swift
case hsl(CGFloat, CGFloat, CGFloat)
-
Hue, Saturation, Brightness
Declaration
Swift
case hsb(CGFloat, CGFloat, CGFloat)
-
Cyan, Magenta, Yellow, Key (Black)
Declaration
Swift
case cmyk(CGFloat, CGFloat, CGFloat, CGFloat)
-
UInt32 (hex)
Declaration
Swift
case hex(UInt32)
-
Returns the model as an RGB tuple
Declaration
Swift
public var rgb: (r: CGFloat, g: CGFloat, b: CGFloat) { get }
-
Returns the model as an HSL tuple
Declaration
Swift
public var hsl: (h: CGFloat, s: CGFloat, l: CGFloat) { get }
-
Returns the model as an HSB tuple
Declaration
Swift
public var hsb: (h: CGFloat, s: CGFloat, b: CGFloat) { get }
-
Returns the model as a CMYK tuple
Declaration
Swift
public var cmyk: (c: CGFloat, m: CGFloat, y: CGFloat, k: CGFloat) { get }
-
Returns the model as a UInt32 (hex) value
Declaration
Swift
public var hex: UInt32 { get }