Dismiss color picker?

OS X Cocoa App.

I have a Popover window that allows the user to choose a colour for a line on a graph.

It uses an NSColorWell. When the user clicks in the well, the Colour Picker appears - which is good.


When the user is done, they click away from the Popover and it disappears, but unless they specifically dismiss the colour picker it remains on screen.

How can I programatically dismiss the colour picker?


(I have some screen shots, but your posts don't appear if you include links to images.)

NSColorPanel is just a window, so you can call NSColorPanel.sharedColorPanel.performClose(). However, it's perfectly fine for the panel to stay visible onscreen—that's actually the expected behavior.

Dismiss color picker?
 
 
Q