usingColorSpaceName(_:device:)
Creates a new color object for the same color, but in the specified color space and specific to the provided device.
Declaration
func usingColorSpaceName(_ name: NSColorSpaceName?, device deviceDescription: [NSDeviceDescriptionKey : Any]?) -> NSColor?Parameters
- name:
The name of the color space containing the new
NSColorobject. IfcolorSpaceisnil, the most appropriate color space is used. - deviceDescription:
The device description. Device descriptions can be obtained from windows, screens, and printers with the
deviceDescriptionmethod.If
deviceDescriptionisnil, the current device (as obtained from the currently lockFocus’ed view’s window or, if printing, the current printer) is used.
Return Value
The new NSColor object or nil if the specified conversion cannot be done.