---
title: "write(to:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolor/write(to:)"
---

# write(to:)

Writes the color object’s data to the specified pasteboard.

## Declaration

```swift
func write(to pasteBoard: NSPasteboard)
```

## Parameters

- `pasteBoard`: The pasteboard to which to write the receiver’s color data. If this pasteboard doesn’t support color data, the method does nothing.

## See Also

### Copying and pasting color Information

- [init(from:)](appkit/nscolor/init(from:).md)
