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

# insertNewButtonImage(_:in:)

Sets the image of a given button cell.

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

## Parameters

`newButtonImage`

The image to set for the button cell.

`buttonCell`

The `NSButtonCell` object that lets the user choose the picker from the color panel—the color picker’s representation in the  `NSMatrix` of the `NSColorPanel`.

## Discussion

This method should perform application-specific manipulation of the image before it’s inserted and displayed by the button cell.

---

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)