Instance Method

converted(to:intent:options:)

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

Declaration

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

Parameters

CGColorSpaceRef

The destination color space.

intent

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

options

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.

Discussion

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