I added NSWindowDelegate to my controller and add method
- (void)windowWillClose:(NSNotification *)notification {
if ([notification.object isEqual:[NSColorPanel sharedColorPanel]]) {
[[NSColorPanel sharedColorPanel] setAction:nil];
}
}
So I have to close NSColorPanel before I use it again.