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

# init(calibratedWhite:alpha:)

Creates a color object using the given opacity and grayscale values.

## Declaration

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

## Parameters

- `white`: The grayscale 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

- [getWhite(_:alpha:)](appkit/nscolor/getwhite(_:alpha:).md)

### Creating a color using white components

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