stringRepresentation
Returns a formatted string with the unpremultiplied color and alpha components of the color.
Declaration
var stringRepresentation: String { get }Discussion
The string representation always has four components: red, green, blue, and alpha.
Some example string representations of colors:
|
|
|---|---|
|
|
|
|
To create a CIColor instance from a string representation, use the init(string:) method.
If the CIColor was initialized with a CGColor in a non-RGB CGColorSpace then it will be converted to sRGB to get the red, green, and blue components.
This property is not KVO-safe because it returns a new NSString instance each time. The value of the NSString will be the same each time it is called.