<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ColorSync",
  "identifier" : "/documentation/ColorSync/ColorSyncProfile/adding(headroomAdaptiveGainCurve:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ColorSync"
    ],
    "preciseIdentifier" : "s:So19ColorSyncProfileRefa0aB0E6adding25headroomAdaptiveGainCurveABSgAbCE08HeadroomghI0V_tF"
  },
  "title" : "adding(headroomAdaptiveGainCurve:)"
}
-->

# adding(headroomAdaptiveGainCurve:)

Returns a copy of this profile with raw Headroom Adaptive Gain Curve data
embedded as an HAGC tag.

```
func adding(headroomAdaptiveGainCurve: ColorSyncProfile.HeadroomAdaptiveGainCurve) -> ColorSyncProfile?
```

## Parameters

`headroomAdaptiveGainCurve`

The HAGC info dictionary to create the metadata embedded in the profile.

## Return Value

A new profile carrying the HAGC tag, or `nil` if this profile’s
transfer function isn’t PQ, HLG, or linear, or if embedding fails.

## Discussion

The curve is validated when you construct [`ColorSyncProfile.HeadroomAdaptiveGainCurve`](/documentation/ColorSync/ColorSyncProfile/HeadroomAdaptiveGainCurve-swift.struct), so
this method only embeds it. The original profile is unchanged.

---

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)