<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCPlugInContext/colorSpace()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(pl)QCPlugInContext(im)colorSpace"
  },
  "title" : "colorSpace()"
}
-->

# colorSpace()

Returns the color space used by the rendering context.

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

## Return Value

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

## Discussion

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

---

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)