---
title: "activate(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolorwell/activate(_:)"
---

# activate(_:)

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

## Declaration

```swift
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

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 property is true, the color well highlights that border while it’s active.

## See Also

### Activating and deactivating color wells

- [isActive](appkit/nscolorwell/isactive.md)
- [deactivate()](appkit/nscolorwell/deactivate().md)
