---
title: "init(src:dst:)"
framework: coregraphics
role: symbol
role_heading: Initializer
path: "coregraphics/cgcolorconversioninfo/init(src:dst:)"
---

# init(src:dst:)

Creates a conversion between two specified color spaces.

## Declaration

```swift
init?(src: CGColorSpace, dst: CGColorSpace)
```

## Parameters

- `src`: The source color space from which color values are to be converted.
- `dst`: The destination color space to which colors are to be converted.

## Return Value

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

## Discussion

Discussion 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

- [init(optionsSrc:dst:options:)](coregraphics/cgcolorconversioninfo/init(optionssrc:dst:options:).md)
- [CGColorConversionInfoTransformType](coregraphics/cgcolorconversioninfotransformtype.md)
