Instance Method

colorUsingColorSpaceName:device:

Creates a new color object for the same color, but in the specified color space and specific to the given device.

Declaration

- (NSColor *)colorUsingColorSpaceName:(NSColorSpaceName)name device:(NSDictionary<NSDeviceDescriptionKey, id> *)deviceDescription;

Parameters

colorSpace

The name of the color space containing the new NSColor object. If colorSpace is nil, the most appropriate color space is used.

deviceDescription

The device description. Device descriptions can be obtained from windows, screens, and printers with the deviceDescription method.

If deviceDescription is nil, 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.

See Also

Transforming an Existing Color Object

- colorUsingColorSpace:

Creates a new color object representing the color of the receiver in the specified color space.

- blendedColorWithFraction:ofColor:

Creates a new color object whose component values are a weighted sum of the receiver’s and the specified color object's.

- colorWithAlphaComponent:

Creates a new color object that has the same color space and component values as the receiver, but the specified alpha component.

- highlightWithLevel:

Creates a new color object that represents a blend between the current color and the highlight color.

- shadowWithLevel:

Creates a new color object that represents a blend between the current color and the shadow color.

- colorUsingColorSpaceName:

Creates a new color object whose color is the same as the receiver’s, except that the new NSColor is in the specified color space.

Deprecated