---
title: "attachColorList(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolorpanel/attachcolorlist(_:)"
---

# attachColorList(_:)

Adds the list of NSColor objects specified to all the color pickers in the receiver that display color lists by invoking attachColorList(_:) on all color pickers in the application.

## Declaration

```swift
func attachColorList(_ colorList: NSColorList)
```

## Parameters

- `colorList`: The list of colors to add to the color pickers in the receiver.

## Discussion

Discussion An application should use this method to add an NSColorList saved with a document in its file package or in a directory other than NSColorList’s standard search directories.

## See Also

### Managing color lists

- [detachColorList(_:)](appkit/nscolorpanel/detachcolorlist(_:).md)
