Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are NSColors like tungsten and steel also available?

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?

like image 781
Kane Avatar asked Feb 03 '26 06:02

Kane


2 Answers

You want NSColorList. The one named “Crayons” corresponds to the crayon box in the Color Panel.

like image 76
Peter Hosey Avatar answered Feb 04 '26 19:02

Peter Hosey


You should find the rgb values for those colors and make your own NSColor. Documentation for NSColor from rgb here

like image 26
jqpubliq Avatar answered Feb 04 '26 20:02

jqpubliq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!