<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCRenderer/init(composition:colorSpace:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCRenderer(im)initWithComposition:colorSpace:"
  },
  "title" : "init(composition:colorSpace:)"
}
-->

# init(composition:colorSpace:)

Creates a  renderer object  with a composition object and a color space.

```
init!(composition: QCComposition!, colorSpace: CGColorSpace!)
```

## Parameters

`composition`

A [`QCComposition`](/documentation/Quartz/QCComposition) object. The composition must  not contain any consumer patches. That is, the composition can receive data, process it, and produce output values, but it cannot perform any rendering.

`colorSpace`

A Quartz color space object. This must be an RGB color space. Pass `NULL` to use the default RGB color space. The color space is used only for the images produced by the  output image ports of the composition. For more information on Quartz color spaces, see [Quartz 2D Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001066).

## Return Value

The initialized `QCRenderer` object or `nil` if initialization is not successful.

## Discussion

Note that [`snapshotImage()`](/documentation/Quartz/QCRenderer/snapshotImage()) and [`createSnapshotImage(ofType:)`](/documentation/Quartz/QCRenderer/createSnapshotImage(ofType:)) always returns `nil` on such `QCRenderer` instances.

---

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)