<!--
{
  "documentType" : "article",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/capture-device-white-balance",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "White balance"
}
-->

# White balance

Configure the automatic white balance behavior of a camera, or manually control white balance settings.

## Topics

### Configuring automatic white balance

[`isWhiteBalanceModeSupported(_:)`](/documentation/AVFoundation/AVCaptureDevice/isWhiteBalanceModeSupported(_:))

Returns a Boolean value that indicates whether the device supports the specified white balance mode.

[`whiteBalanceMode`](/documentation/AVFoundation/AVCaptureDevice/whiteBalanceMode-swift.property)

The current white balance mode.

[`AVCaptureDevice.WhiteBalanceMode`](/documentation/AVFoundation/AVCaptureDevice/WhiteBalanceMode-swift.enum)

Constants to specify the white balance mode of a capture device.

### Monitoring white balance changes

[`isAdjustingWhiteBalance`](/documentation/AVFoundation/AVCaptureDevice/isAdjustingWhiteBalance)

A Boolean value that indicates whether the device is currently adjusting the white balance.

### Inspecting gain levels

[`deviceWhiteBalanceGains`](/documentation/AVFoundation/AVCaptureDevice/deviceWhiteBalanceGains)

The current device-specific RGB white balance gain values in use.

[`grayWorldDeviceWhiteBalanceGains`](/documentation/AVFoundation/AVCaptureDevice/grayWorldDeviceWhiteBalanceGains)

The current device-specific white balance values required for a neutral gray white point.

[`maxWhiteBalanceGain`](/documentation/AVFoundation/AVCaptureDevice/maxWhiteBalanceGain)

The maximum supported value to which you can set a color channel.

### Performing conversions

[`chromaticityValues(for:)`](/documentation/AVFoundation/AVCaptureDevice/chromaticityValues(for:))

Converts device-specific white balance RGB gain values to device-independent chromaticity values.

[`temperatureAndTintValues(for:)`](/documentation/AVFoundation/AVCaptureDevice/temperatureAndTintValues(for:))

Converts device-specific white balance RGB gain values to device-independent temperature and tint values.

[`deviceWhiteBalanceGains(for:)`](/documentation/AVFoundation/AVCaptureDevice/deviceWhiteBalanceGains(for:)-9gdtw)

Converts device-independent chromaticity values to device-specific white balance RGB gain values.

[`deviceWhiteBalanceGains(for:)`](/documentation/AVFoundation/AVCaptureDevice/deviceWhiteBalanceGains(for:)-3wtsa)

Converts device-independent temperature and tint values to device-specific white balance RGB gain values.

[`AVCaptureDevice.WhiteBalanceGains`](/documentation/AVFoundation/AVCaptureDevice/WhiteBalanceGains)

A structure that defines RGB white balance gain values.

[`AVCaptureDevice.WhiteBalanceChromaticityValues`](/documentation/AVFoundation/AVCaptureDevice/WhiteBalanceChromaticityValues)

A structure that defines CIE 1931 xy chromaticity values.

[`AVCaptureDevice.WhiteBalanceTemperatureAndTintValues`](/documentation/AVFoundation/AVCaptureDevice/WhiteBalanceTemperatureAndTintValues)

A structure that defines temperature and tint values correlated to a white-balance color.

### Setting white balance manually

[`isLockingWhiteBalanceWithCustomDeviceGainsSupported`](/documentation/AVFoundation/AVCaptureDevice/isLockingWhiteBalanceWithCustomDeviceGainsSupported)

A Boolean value that indicates whether the device supports locking white balance to specific gain values.

[`setWhiteBalanceModeLocked(with:completionHandler:)`](/documentation/AVFoundation/AVCaptureDevice/setWhiteBalanceModeLocked(with:completionHandler:))

Sets the white balance to locked mode with the specified white balance gains.

[`setWhiteBalanceModeLocked(whiteBalanceTemperatureAndTintValues:handler:)`](/documentation/AVFoundation/AVCaptureDevice/setWhiteBalanceModeLocked(whiteBalanceTemperatureAndTintValues:handler:))

Sets white balance to locked mode with explicit temperature and tint values.



---

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)