---
title: "init(red:green:blue:alpha:linearExposure:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscolor/init(red:green:blue:alpha:linearexposure:)"
---

# init(red:green:blue:alpha:linearExposure:)

Generates an HDR color in the extended sRGB colorspace by applying an exposure to the SDR color defined by the red, green, and blue components. The red, green, and blue components have a nominal range of [0..1], linearExposure is a value >= 1. To produce an HDR color, we process the given color in a linear color space, multiplying component values by linearExposure . The produced color will have a contentHeadroom equal to linearExposure. Each doubling of linearExposure produces a color that is twice as bright.

## Declaration

```swift
init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat, linearExposure: CGFloat)
```

## See Also

### Creating a high dynamic range (HDR) color

- [init(red:green:blue:alpha:exposure:)](appkit/nscolor/init(red:green:blue:alpha:exposure:).md)
