HexColorSet
public struct HexColorSet: ColorSetProtocol
Implementation of ColorSetProtocol which transform Hex strings into UIColors using the color’s hex value as the String key.
-
Initializer takes in hex value as String
Declaration
Swift
public init?(rawValue: String)Parameters
rawValueHex value as String, Hex can either contain 8 digits where the last two represent the color’s alpha value, or 6 digits in which the alpha defaults to 1.0
-
The original string provided during initialization
Declaration
Swift
public var rawValue: String -
UIColor derived from the rawValue
Declaration
Swift
public var color: UIColor
View on GitHub
Install in Dash
HexColorSet Structure Reference