• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSColor to color name/NSString:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColor to color name/NSString:


  • Subject: Re: NSColor to color name/NSString:
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 8 Jul 2005 19:05:34 -0500

On Jul 8, 2005, at 5:24 PM, Trevor Goodson wrote:

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"];

NSColor conforms to NSCoding, so you can archive them directly. Also, you may want to look into using NSKeyedArchiver.


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;

I don't think you can access those names.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
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


References: 
 >NSColor to color name/NSString: (From: "Trevor Goodson" <email@hidden>)

  • Prev by Date: Script Editor not displaying Suite info of loadable plugins
  • Next by Date: Re: What is a "positional parameter" in the context of localizable strings?
  • Previous by thread: NSColor to color name/NSString:
  • Next by thread: Re: NSColor to color name/NSString:
  • Index(es):
    • Date
    • Thread