CocoaDev

Edit AllPages

Hello,

I’m trying to create a screen color picker in my app (like the one in the standard color picker when you click on the magnifying glass), and I was wondering if there is any way to run the NSColorPanel screen picker from code and get the returned color? Does anyone know if this is even possible? Thanks for any insight!


Get the colorPanel from it and then the color from that.


I know how to do that, but I want to actually run the screen picker by clicking a button in my app to let the user select a color from the screen, and then have the selected color returned to my app. Any ideas?

See GettingTheColorUnderTheCursor