Creates a conversion between two specified color spaces.


init?(src: CGColorSpace, dst: CGColorSpace)



The source color space from which color values are to be converted.


The destination color space to which colors are to be converted.

Return Value

A color conversion object, or nil if no conversion between the specified color spaces is allowed.


The source and destination color spaces must be calibrated color spaces (that is, not device-specific or indexed color spaces).

You can use a color conversion object to create MPSImageConversion filters that perform GPU-accelerated color space conversion.

See Also

Creating a Color Conversion

enum CGColorConversionInfoTransformType

Constants describing how a color conversion uses 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