---
title: "adding(headroomAdaptiveGainCurve:)"
framework: colorsync
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "colorsync/colorsyncprofile/adding(headroomadaptivegaincurve:)"
---

# adding(headroomAdaptiveGainCurve:)

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

## Declaration

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

## Parameters

- `headroomAdaptiveGainCurve`: The HAGC info dictionary to create the metadata embedded in the profile.

## Return Value

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

Discussion The curve is validated when you construct ColorSyncProfile.HeadroomAdaptiveGainCurve, so this method only embeds it. The original profile is unchanged.

## See Also

### Attaching a curve in Swift

- [adding(headroomAdaptiveGainCurveMetadata:options:)](colorsync/colorsyncprofile/adding(headroomadaptivegaincurvemetadata:options:).md)
- [ColorSyncProfile.HeadroomAdaptiveGainCurveOptions](colorsync/colorsyncprofile/headroomadaptivegaincurveoptions.md)
