<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/activeColorSpace",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDevice(py)activeColorSpace"
  },
  "title" : "activeColorSpace"
}
-->

# activeColorSpace

The currently active color space for capture.

```
var activeColorSpace: AVCaptureColorSpace { get set }
```

## Discussion

All devices and formats support capture in the sRGB color space. Some devices and formats can also capture in the P3 color space, which includes a much wider gamut of colors than the sRGB color space. By default, a capture session automatically enables wide-gamut capture for supported devices and capture workflows—for details, see the [`automaticallyConfiguresCaptureDeviceForWideColor`](/documentation/AVFoundation/AVCaptureSession/automaticallyConfiguresCaptureDeviceForWideColor) of your capture session. To instead set the color space manually, disable that [`AVCaptureSession`](/documentation/AVFoundation/AVCaptureSession) property before setting the active color space.

For best results, choose a color space before calling [`startRunning()`](/documentation/AVFoundation/AVCaptureSession/startRunning()) on your capture session. Changing this property while a capture session is running requires a disruptive reconfiguration of the capture render pipeline—movie captures in progress ends immediately, unfulfilled photo requests abort, and video preview temporarily freeze.

Before changing this property, you must call the [`lockForConfiguration()`](/documentation/AVFoundation/AVCaptureDevice/lockForConfiguration()) method to obtain exclusive access to the capture device. Attempting to change this property without locking the device raises an exception (<doc://com.apple.documentation/documentation/Foundation/NSExceptionName/genericException>).

---

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)