I know Cocoa gives you whiteColor
, blackColor
, darkGrayColor
, but do they also have the colors from in Apple's color panel? With colors like "Snow", "Tungsten", "Steel", "Tin" ? Or should I create those myself?
views:
60answers:
2
+1
A:
You should find the rgb values for those colors and make your own NSColor. Documentation for NSColor from rgb here
jqpubliq
2010-04-12 19:42:18
That's what I thought too but in the comment above, Peter proofed us wrong.
Kane
2010-04-13 08:47:28
+4
A:
You want NSColorList. The one named “Crayons” corresponds to the crayon box in the Color Panel.
Peter Hosey
2010-04-12 19:44:14
+1 It goes to show that even after years of using Cocoa, I still discover new classes all the time.
Dave DeLong
2010-04-12 20:14:48