I have a litle problem with saving a color in NSUserDefaults . In objective-c is easy :
-(NSColor *)colorForKey:(NSString *)key{ NSData *data; NSColor *color;
Storing an NSColor instance in user defaults
store the value in aColor in user defaults as the value for key aKey
NSData *theData=[NSArchiver archivedDataWithRootObject:aColor]; [[NSUserDefaults standardUserDefaults] setObject:theData forKey:aKey];