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

# activate(_:)

Activates the color well, displays the color panel, and synchronizes the two UI elements.

```
func activate(_ exclusive: Bool)
```

## Parameters

`exclusive`

<doc://com.apple.documentation/documentation/Swift/true> to deactivate any other color wells; <doc://com.apple.documentation/documentation/Swift/false> to keep them active. If a color panel is active with `exclusive` set to <doc://com.apple.documentation/documentation/Swift/true> and another is subsequently activated with `exclusive` set to <doc://com.apple.documentation/documentation/Swift/false>, the exclusive setting of the first panel is ignored.

## Discussion

When you call this method, the color well displays the standard color panel and sets the panel’s current color to the value in the color well. When someone changes the color in the color panel, the color well updates its selected color to match. If the color well’s [`isBordered`](/documentation/AppKit/NSColorWell/isBordered) property is <doc://com.apple.documentation/documentation/Swift/true>, the color well highlights that border while it’s active.

---

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)