<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImageRepresentationOption/hdrGainMapAsRGB",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:@kCIImageRepresentationHDRGainMapAsRGB"
  },
  "title" : "hdrGainMapAsRGB"
}
-->

# hdrGainMapAsRGB

An optional key and value to request the gain map channel to be color instead of monochrome.

```
static let hdrGainMapAsRGB: CIImageRepresentationOption
```

## Discussion

This key affects how the gain map image is calculated from the SDR receiver and
the [`hdrImage`](/documentation/CoreImage/CIImageRepresentationOption/hdrImage) image value.

The value for this is a Boolean where:

- True: the gain map is created as a color ratio between the HDR and SDR images.
- False: the gain map is created as a brightness ratio between the HDR and SDR images.
- Not specified: the default behavior False.

---

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)