---
title: "insertNewButtonImage(_:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscolorpickingdefault/insertnewbuttonimage(_:in:)"
---

# insertNewButtonImage(_:in:)

Sets the image of a given button cell.

## Declaration

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

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

## See Also

### Configuring Color Pickers

- [setMode(_:)](appkit/nscolorpickingdefault/setmode(_:).md)
- [provideNewButtonImage()](appkit/nscolorpickingdefault/providenewbuttonimage().md)
- [minContentSize()](appkit/nscolorpickingdefault/mincontentsize().md)
- [buttonToolTip()](appkit/nscolorpickingdefault/buttontooltip().md)
