---
title: "changeColor(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolorchanging/changecolor(_:)"
---

# changeColor(_:)

Sent to the first responder when the user selects a color in an NSColorPanel object.

## Declaration

```swift
func changeColor(_ sender: NSColorPanel?)
```

## Parameters

- `sender`: The doc://com.apple.appkit/documentation/AppKit/NSColorPanel sending the message.
