-
The red value of the color object. Values between [0, 255]
Declaration
Swift
public let r: UInt8 -
The green value of the color object. Values between [0, 255]
Declaration
Swift
public let g: UInt8 -
The blue value of the color object. Values between [0, 255]
Declaration
Swift
public let b: UInt8 -
The alpha value of the color object. Values between [0.0, 1.0]
Declaration
Swift
public let a: Double -
Initializes a
CarbonStyle.ColorDeclaration
Swift
public init(r: UInt8, g: UInt8, b: UInt8, a: Double)Parameters
rThe red value of the color object.
gThe green value of the color object.
bThe blue value of the color object.
aThe alpha value of the color object.
-
A query string representation of
Color.Declaration
Swift
public var description: String { get } -
A group of predefined Carbon colors.
Declaration
Swift
public static let all: [String : CarbonStyle.Color] -
Predefined nef
Color.Declaration
Swift
public static let nef: CarbonStyle.Color -
Predefined bow
Color.Declaration
Swift
public static let bow: CarbonStyle.Color -
Predefined white
Color.Declaration
Swift
public static let white: CarbonStyle.Color -
Predefined yellow
Color.Declaration
Swift
public static let yellow: CarbonStyle.Color -
Predefined green
Color.Declaration
Swift
public static let green: CarbonStyle.Color -
Predefined blue
Color.Declaration
Swift
public static let blue: CarbonStyle.Color -
Predefined orange
Color.Declaration
Swift
public static let orange: CarbonStyle.Color -
Initializes a
CarbonStyle.ColorDeclaration
Swift
public init?(hex: String)Parameters
hexCreates a
Colorfrom a hexadecimal String. -
Initializes a
CarbonStyle.Color.Declaration
Swift
public init?(default string: String)Parameters
defaultCreates a
Colorfrom a predefined value. -
Converts
Colorinto its hexadecimal representation.Declaration
Swift
public var hex: String { get }
Install in Dash
Color Structure Reference