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

# init(from:)

Creates a color object from color data currently on the pasteboard.

## Declaration

```swift
init?(from pasteBoard: NSPasteboard)
```

## Parameters

- `pasteBoard`: The pasteboard from which to return the color.

## Return Value

Return Value The color currently on the pasteboard or nil if pasteBoard doesn’t contain color data. The returned color’s alpha component is set to 1.0 if ignoresAlpha returns true.

## See Also

### Copying and pasting color Information

- [write(to:)](appkit/nscolor/write(to:).md)
