NSColor to color name/NSString:
NSColor to color name/NSString:
- Subject: NSColor to color name/NSString:
- From: "Trevor Goodson" <email@hidden>
- Date: Fri, 08 Jul 2005 18:24:06 -0400
Hello all,
I'm working on an application that uses color. The user can color any number
of graphics items and these colors are stored as NSData using the NSArchiver
approach:
NSData *theData = [NSArchiver archivedDataWithRootObject:(NSColor*)color];
[currentTag setObject:theData forKey:@"color"];
My question:
Is it it possible to obtain the name of the color when the user selects it
using "crayons" or perhaps the "color palettes" tool via the color panel.
For example, you will notice the system already displays the color names in
these two modes; so I was wondering if I can access this information.
Eventually we want to store names of colors in SQL.
If there is a "cocoa way" of doing this, I'm in favor of doing that.
Otherwise, I will have to write my own look-up table & function;
Thanks in advance for any help/comments!
Trevor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden