---
title: "deviceWhiteBalanceGains(for:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturedevice/devicewhitebalancegains(for:)-9gdtw"
---

# deviceWhiteBalanceGains(for:)

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

## Declaration

```swift
func deviceWhiteBalanceGains(for chromaticityValues: AVCaptureDevice.WhiteBalanceChromaticityValues) -> AVCaptureDevice.WhiteBalanceGains
```

## Parameters

- `chromaticityValues`: The chromaticity values for which to get white balance RGB gain values.

## Return Value

Return Value A structure that contains device-specific RGB gain values.

## Discussion

Discussion This property specifies the current red, green, and blue gain values used for white balance. You can use the values to adjust color casts for a given scene. Each channel supports values between 1.0 and -maxWhiteBalanceGain. This property is key-value observable.

## See Also

### Performing conversions

- [chromaticityValues(for:)](avfoundation/avcapturedevice/chromaticityvalues(for:).md)
- [temperatureAndTintValues(for:)](avfoundation/avcapturedevice/temperatureandtintvalues(for:).md)
- [deviceWhiteBalanceGains(for:)](avfoundation/avcapturedevice/devicewhitebalancegains(for:)-3wtsa.md)
- [AVCaptureDevice.WhiteBalanceGains](avfoundation/avcapturedevice/whitebalancegains.md)
- [AVCaptureDevice.WhiteBalanceChromaticityValues](avfoundation/avcapturedevice/whitebalancechromaticityvalues.md)
- [AVCaptureDevice.WhiteBalanceTemperatureAndTintValues](avfoundation/avcapturedevice/whitebalancetemperatureandtintvalues.md)
