title: Open color palette on IBAction given to button
body: <p>I have a round rect textured button. Upon clicking that button, I want to open a color palette. I have used this code but it is not working:</p>
  
  <pre><code>- (IBAction)chooseColor:(id)sender
  {
      NSColorPanel *colorPanel;
      colorPanel = [NSColorPanel sharedColorPanel];
      [colorPanel setColor:[sender color]];
  
  }
  </code></pre>
  
  <p>This is a Mac application.</p>