---
title: "init(genericGamma22White:alpha:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscolor/init(genericgamma22white:alpha:)"
---

# init(genericGamma22White:alpha:)

Returns a color object with the specified white and alpha values in the GenericGamma22 colorspace.

## Declaration

```swift
init(genericGamma22White white: CGFloat, alpha: CGFloat)
```

## Parameters

- `white`: The white value of the color object.
- `alpha`: The opacity value of the color object.

## Return Value

Return Value The color object.

## Discussion

Discussion Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.

## See Also

### Related Documentation

- [init(srgbRed:green:blue:alpha:)](appkit/nscolor/init(srgbred:green:blue:alpha:)-9oz51.md)
- [init(deviceHue:saturation:brightness:alpha:)](appkit/nscolor/init(devicehue:saturation:brightness:alpha:).md)
- [init(calibratedRed:green:blue:alpha:)](appkit/nscolor/init(calibratedred:green:blue:alpha:).md)

### Creating a color using white components

- [init(white:alpha:)](appkit/nscolor/init(white:alpha:).md)
- [init(calibratedWhite:alpha:)](appkit/nscolor/init(calibratedwhite:alpha:).md)
- [init(deviceWhite:alpha:)](appkit/nscolor/init(devicewhite:alpha:).md)
