---
title: whiteBalanceMode
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedevice/whitebalancemode-swift.property
---

# whiteBalanceMode

The current white balance mode.

## Declaration

```swift
var whiteBalanceMode: AVCaptureDevice.WhiteBalanceMode { get set }
```

## Discussion

Discussion Before changing the value of this property, you must call lockForConfiguration() to acquire exclusive access to the device’s configuration properties. Otherwise, setting the value of this property raises an exception. When you’re done configuring the device, call unlockForConfiguration() to release the lock and allow other devices to configure the settings. This property is key-value observable.

## See Also

### Configuring automatic white balance

- [isWhiteBalanceModeSupported(_:)](avfoundation/avcapturedevice/iswhitebalancemodesupported(_:).md)
- [AVCaptureDevice.WhiteBalanceMode](avfoundation/avcapturedevice/whitebalancemode-swift.enum.md)
