<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColor/init(genericGamma22White:alpha:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSColor(cm)colorWithGenericGamma22White:alpha:"
  },
  "title" : "init(genericGamma22White:alpha:)"
}
-->

# init(genericGamma22White:alpha:)

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

```
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

The color object.

## Discussion

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

## See Also

[`+  colorWithSRGBRed:green:blue:alpha:`](/documentation/AppKit/NSColor/init(srgbRed:green:blue:alpha:)-9oz51)

Creates a color object from the specified components in the sRGB colorspace.

[`+  colorWithDeviceHue:saturation:brightness:alpha:`](/documentation/AppKit/NSColor/init(deviceHue:saturation:brightness:alpha:))

Creates a color object using the given opacity value and HSB color space components.

[`+  colorWithCalibratedRed:green:blue:alpha:`](/documentation/AppKit/NSColor/init(calibratedRed:green:blue:alpha:))

Creates a color object using the given opacity and RGB components.



---

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)