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

# insertNewButtonImage(_:in:)

Sets the image used for the specified button cell.

```
@MainActor func insertNewButtonImage(_ newButtonImage: NSImage, in buttonCell: NSButtonCell)
```

## Parameters

`newButtonImage`

The image used for the specified button cell.

`buttonCell`

The button cell for which to set the image.

## Discussion

Called by the color panel to insert a new image into the specified cell by invoking `NSButtonCell`’s setImage: method. Override this method to customize `newButtonImage` before insertion in `buttonCell`.

---

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)