---
title: colorSpace()
framework: quartz
role: symbol
role_heading: Instance Method
path: quartz/qcplugincontext/colorspace()
---

# colorSpace()

Returns the color space used by the rendering context.

## Declaration

```swift
func colorSpace() -> Unmanaged<CGColorSpace>!
```

## Return Value

Return Value An RGB color space; NULL if the custom patch execution mode is not consumer.

## Discussion

Discussion If the method returns a color space, it must be an RGB color space.

## See Also

### Getting Execution Context Information

- [userInfo()](quartz/qcplugincontext/userinfo().md)
- [bounds()](quartz/qcplugincontext/bounds().md)
