<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGColorConversionInfo/init(src:dst:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGColorConversionInfoCreate"
  },
  "title" : "init(src:dst:)"
}
-->

# init(src:dst:)

Creates a conversion between two specified color spaces.

```
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

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

## 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 <doc://com.apple.documentation/documentation/MetalPerformanceShaders/MPSImageConversion> filters that perform GPU-accelerated color space conversion.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)