<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSColorPickingDefault/detachColorList(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSColorPickingDefault(im)detachColorList:"
  },
  "title" : "detachColorList(_:)"
}
-->

# detachColorList(_:)

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

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

## Parameters

`colorList`

The color list to detach.

## Discussion

You never invoke this method; it’s invoked automatically by the `NSColorPanel` object when its [`detachColorList(_:)`](/documentation/AppKit/NSColorPanel/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)