usingColorSpace(_:)
Creates a new color object representing the color of the current color object in the specified color space.
Declaration
func usingColorSpace(_ space: NSColorSpace) -> NSColor?Parameters
- space:
The color space of the new
NSColorobject.
Return Value
The new NSColor object. This method converts the receiver’s color to an equivalent one in the new color space. Although the new color might have different component values, it looks the same as the original. Returns nil if conversion is not possible.
Discussion
If the receiver’s color space is the same as that specified in space, this method returns the same NSColor object.