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

# detachColorList(_:)

Removes the list of colors from all the color pickers in the receiver that display color lists by invoking [`detachColorList(_:)`](/documentation/AppKit/NSColorPanel/detachColorList(_:)) on all color pickers in the application.

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

## Parameters

`colorList`

The list of `NSColor` objects to remove from the color pickers in the color panel.

## Discussion

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

---

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)