---
title: "init(deviceCyan:magenta:yellow:black:alpha:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscolor/init(devicecyan:magenta:yellow:black:alpha:)"
---

# init(deviceCyan:magenta:yellow:black:alpha:)

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

## Declaration

```swift
init(deviceCyan cyan: CGFloat, magenta: CGFloat, yellow: CGFloat, black: CGFloat, alpha: CGFloat)
```

## Parameters

- `cyan`: The cyan component of the color object.
- `magenta`: The magenta component of the color object.
- `yellow`: The yellow component of the color object.
- `black`: The black component 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

- [getCyan(_:magenta:yellow:black:alpha:)](appkit/nscolor/getcyan(_:magenta:yellow:black:alpha:).md)
