---
title: "init(workingColorSpace:targetColorSpace:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/lowlevelrenderer/colormatch-swift.struct/init(workingcolorspace:targetcolorspace:)"
---

# init(workingColorSpace:targetColorSpace:)

Creates a color match from a working color space and a target display color space.

## Declaration

```swift
init(workingColorSpace: CGColorSpace, targetColorSpace: CGColorSpace) throws(LowLevelRendererError)
```

## Parameters

- `workingColorSpace`: The color space in which the renderer performs shading calculations.
- `targetColorSpace`: The color space of the output display to convert to.

## Discussion

Discussion Throws LowLevelRendererError if either color space is not a supported linear gamut. note: LowLevelRendererError if either color space is not a supported linear gamut.

## See Also

### Creating a color match

- [init(colorGamutConversion:enableClampValues:)](realitykit/lowlevelrenderer/colormatch-swift.struct/init(colorgamutconversion:enableclampvalues:).md)
