In ~/Library/Colors
you can find saved palette files created in OSX's color picker. What is the format of these files and how can they be created? The most I've been able to figure out is that they may be some sort of serialized NSObject data.
They are created by the NSColorList
class, documented here:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSColorList_Class/Reference/Reference.html
This site has a much better list of stuff you can do with color lists then Apples suspiciously austere offerings.
Included are…
Personally I'm still after the frustratingly intangible holy Grail of getting the Pantone CLR files off of an old NeXt box. BIG ups to anyone that can snag those suckers. Crayons are for kids. HMMPH.
EDIT: Here is a simple example of how to create an NSColorList
NSColorList *list = [NSColorList.alloc initWithName:@"Pretty Colors"];
[ @{ @"mauve": [NSColor colorWithDeviceRed:.6 green:.6 blue:.5 alpha:1],
@"mustard": [NSColor colorWithDeviceRed:.6 green:.5 blue:.3 alpha:1],
@"poop-brown":[NSColor colorWithDeviceRed:.4 green:.4 blue:.1 alpha:1] }
enumerateKeysAndObjectsUsingBlock:^(id name, id color, BOOL *s) {
[list setColor:color forKey:name];
}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With