---
title: "detachColorList(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolorpickingdefault/detachcolorlist(_:)"
---

# detachColorList(_:)

Tells the receiver to detach the given color list, unless the receiver isn’t displaying the list.

## Declaration

```swift
@MainActor func detachColorList(_ colorList: NSColorList)
```

## Parameters

- `colorList`: The color list to detach.

## Discussion

Discussion You never invoke this method; it’s invoked automatically by the NSColorPanel object when its detachColorList(_:) method is invoked. Because the NSColorPanel list mode manages NSColorList objects, this method need only be implemented by a custom color picker that manages NSColorList objects itself.

## See Also

### Managing Color Lists

- [attachColorList(_:)](appkit/nscolorpickingdefault/attachcolorlist(_:).md)
