HKColor
@objc
public class HKColor : NSObject
HKColor object for use with scene.colorObject()
-
initialize an HKColor object with a UIColor
Since
SDK 2.0.1Declaration
Swift
@objc public init(_ color: UIColor? = nil)Parameters
colorinitial UIColor
-
tint color as UIColor
Declaration
Swift
@objc public var tint: UIColor -
saturation -1.0 to 1.0, default is 0.0
Declaration
Swift
@objc public var saturation: CGFloat -
opacity 0.0 to 1.0, default is 1.0
Declaration
Swift
@objc public var opacity: CGFloat -
brightness -1.0 to 1.0, default is 0.0
Declaration
Swift
@objc public var brightness: CGFloat -
contrast -1.0 to 1.0, default is 0.0
Declaration
Swift
@objc public var contrast: CGFloat -
Set all of the variables to random settings, for demonstration purposes
Declaration
Swift
@objc public func randomColor()
View on GitHub
HKColor Class Reference