---
title: "init(red:green:blue:alpha:exposure:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uicolor/init(red:green:blue:alpha:exposure:)"
---

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

Generates an HDR color 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], exposure is a value >= 0. To produce an HDR color, we process the given color in a linear color space, multiplying component values by 2^exposure. The produced color will have a contentHeadroom equal to the linearized exposure value. Each whole value of exposure produces a color that is twice as bright.

## Declaration

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

## See Also

### Creating a color from component values

- [init(white:alpha:)](uikit/uicolor/init(white:alpha:).md)
- [init(hue:saturation:brightness:alpha:)](uikit/uicolor/init(hue:saturation:brightness:alpha:).md)
- [init(red:green:blue:alpha:)](uikit/uicolor/init(red:green:blue:alpha:).md)
- [init(red:green:blue:alpha:linearExposure:)](uikit/uicolor/init(red:green:blue:alpha:linearexposure:).md)
- [init(displayP3Red:green:blue:alpha:)](uikit/uicolor/init(displayp3red:green:blue:alpha:).md)
- [init(named:)](uikit/uicolor/init(named:).md)
- [init(named:inBundle:compatibleWithTraitCollection:)](uikit/uicolor/init(named:inbundle:compatiblewithtraitcollection:).md)
