Cocoa Color picker pref

aqsalter

Registered
Can someone please tell me where the prefs list is for the Cocoa Color Picker (you know the one that Mail and Text Edit use)?
My wife just lost all the colors for no apparent reason :( and I want to restore the file from backup... but can't work out where it is.

TIA,
Adam
 
I'm :confused:... could you elaborate? Do you mean the colors stored in the bottom of the picker? Or all the colors possible to choose?

Screenshots always help. PDF is fine.
 
I mean the colors at the bottom of the picker.
You know how you drag the colors to the bottom "tray" section? Well they all went blank for no apparent reason.

I did a quick search for .plist files for with color in the name hoping to just copy it back over the new one, but couldn't find any....

I also couldn't find any Apple documentation on the subject...
 
Do you know how she lost them? And would it work just to recreate your, um, well, "library?" I don't know what to tell you; I have never heard of this happening, though it doesn't surprise me since all the preferences in OS X are based in text files, and files can get rewritten or corrupted.
 
How did she lose them? Well Deneba Canvas crashed at around the same time. We love Canvas, but well it crashed this once. Canvas is the best DTP tool out there in my opinion.

Now I'm not suprised the pref got trashed somehow... But I just want to replace the relevant file. I'm not going to replace the whole library, it's not worth it.

Thanks heaps for the help arden,
 
That would do it. When programs crash, they don't have a chance to clean up stuff they've done, and it probably overwrote or rewrote or corrupted whatever file keeps your colors. My advice is to create a backup of sorts by taking screenshots at regular intervals of the colors you've stored.
 
Arden,

I really appreciate your help.
Unfortunately your answer, while solving my problem, is not really practical.

My wife has already re-created her color list, it's not exactly the same - but life goes on.

So I just wanted to know where the color pref resides for my own curiosity.

Ho hum. Very weird. I actually think it's part of the Finder prefs file. ;)
 
I don't know. It never occurred to me before. If it's really important, you should perform some sort of backup, and without knowing the actual file my way is probably one of the better ways.
 
The file you're looking for is ~/Library/Preferences/.GlobalPreferences.plist
More specifically, the key within that preference file pertaining to the colors is NSColorSwatchData, and you can transplant that from one file to the other if you don't want to muck up stuff like your double-click threshold...
 
Why not back up the whole file, and save all those preferences at the same time? But thanks for pointing this out.
 
Fabulous!

I noticed that her desktop picture got reset at the same time.

So that file must have gotten trashed and reset all the GlobalPreferences...

@Arden:
I do do backups, as I said in my original post. And now I can restore that file from my backup!!

Anarchie, thanks for the information. Where did you find out about Global prefs... is it in Apple documentation?

Since it's a . file no wonder I didn't see it.

I really think this is valuable information.
 
I found it by running fs_usage to watch filesystem activity, then messing around with a color picker to see what files get changed, and then examining each file for color-related stuff. The file didn't actually get touched until I created a new Terminal window, however...
 
This is really good work.

Is this documented anywhere?
anyone?

@Arden
No hard feelings huh? As I said I appreciate your helpful comments. But my original question was quite specific... I'm not really a newbie and I knew exactly what information I was after.

Anarchie addressed my questions very succinctly in both his posts... if you know how to edit .plist files, it is, as anarchie pointed out, preferable to just copy the NSColorSwatchData section than the whole file... Since copying the whole file will reset many "global" settings back to old settings and all I said I wanted was the previous ColorSwatch data.

...Anyway thank you both. ;)
 
Well, it's like I said: if you know the file, then use back that up, but if you don't, use another form of backup. While it wouldn't have helped you recover your original colors, my method would have helped you recover them if this ever recurred.

I'm glad I could at least attempt to help. What, out of curiosity, do you (and your wife) do?
 
In your User Library folder, you will find a color folder. In there is your color palette plist.
Simply replace that with your backed up version, from before the crash, and your palette will be restored.

Peace.
Simeon.
 
Back
Top