Color
public struct Color : Equatable
Captures colors in a platform independent way for subsequent specialization.
-
The amount of red in the color from 0 to 255
Declaration
Swift
public let red: Byte
-
The amount of green in the color from 0 to 255
Declaration
Swift
public let green: Byte
-
The amount of blue in the color from 0 to 255
Declaration
Swift
public let blue: Byte
-
The opacity of color from 0 to 255
Declaration
Swift
public let alpha: Byte
-
Constructs a new
Color
instance with the specified RGBA (alpha is optional)Parameters
r
The amount of red in the color from 0 to 255
g
The amount of green in the color from 0 to 255
b
The amount of blue in the color from 0 to 255
a
The opacity of the color from 0 to 255 (0 fully transparent, 255 fully opaque)
-
Predefined white color
Declaration
Swift
public static let white: Color
-
Predefined black color
Declaration
Swift
public static let black: Color
-
Predefined red color
Declaration
Swift
public static let red: Color
-
Predefined green color
Declaration
Swift
public static let green: Color
-
Predefined blue color
Declaration
Swift
public static let blue: Color
-
Predefined magenta color
Declaration
Swift
public static let magenta: Color
-
Predefined cyan color
Declaration
Swift
public static let cyan: Color
-
Predefined yellow color
Declaration
Swift
public static let yellow: Color
-
Predefined grey color
Declaration
Swift
public static let grey: Color
-
Predefined light grey color
Declaration
Swift
public static let lightGrey: Color
-
Predefined dark grey color
Declaration
Swift
public static let darkGrey: Color
-
Predefined brown color
Declaration
Swift
public static let brown: Color
-
Predefined orange color
Declaration
Swift
public static let orange: Color
-
Predefined pink color
Declaration
Swift
public static let pink: Color
-
Predefined clear color (transparent black)
Declaration
Swift
public static let clear: Color