<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/deviceWhiteBalanceGains(for:)-9gdtw",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDevice(im)deviceWhiteBalanceGainsForChromaticityValues:"
  },
  "title" : "deviceWhiteBalanceGains(for:)"
}
-->

# deviceWhiteBalanceGains(for:)

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

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

## Parameters

`chromaticityValues`

The chromaticity values for which to get white balance RGB gain values.

## Return Value

A structure that contains device-specific RGB gain values.

## 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`](/documentation/AVFoundation/AVCaptureDevice/maxWhiteBalanceGain).

This property is key-value observable.

---

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)