Instance Method


Creates a new color in a different color space that matches the provided color.


func converted(to _: CGColorSpace, intent: CGColorRenderingIntent, options: CFDictionary?) -> CGColor?



The destination color space.


The mechanism to use to match the color when the color is outside the gamut of the new color space.


A dictionary of options used to convert the color. Currently, you should pass NULL.

Return Value

A new color in the destination color space that matches (or closely approximates) the source color.


To create the new color, this method creates a CFColorConverterRef using the options you specified and applies it to the source color.

See Also

Converting Between Color Spaces

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software