When building apps for macOS, you might want to add a background color to your icon in the menu bar. This is a great way to make your app stand out and make it easier for users to find your app in the menu bar. To add a background color to your icon in the menu bar, the trick is to find the right view to apply the background color to. Here's how you can do it in Swift. Start, by getting a reference to the status item. Then, get the status item's button. Configure the image to fit the button. ...