Exactly matching the background of a selected NSMenuItem
I am creating a custom view for an NSMenuItem . In order to draw the background when selected, I adapted a couple of lines from the CustomMenus sample. The CustomMenus sample has: [[NSColor alternateSelectedControlColor] set]; NSRectFillUsingOperation(dirtyRect, NSCompositeSourceOver); .. and I am using the selectedMenuItemColor because the alternateSelectedControlColor was a solid color and it did not look very good: [[NSColor selectedMenuItemColor] set]; NSRectFillUsingOperation(dirtyRect, NSCompositeSourceOver); Using selectedMenuItemColor is better, but it's still not exactly the same as a