Can someone tell me why this one colorUsingColorSpaceNamereturns nil? For example, the following code block will print “deviceColor is nill”:
NSColor *color = [NSColor windowBackgroundColor];
NSColor *deviceColor = [color colorUsingColorSpaceName: NSDeviceRGBColorSpace];
if(deviceColor == nil) NSLog(@"deviceColor is nill");
How to convert NSColorto NSNamedColorSpace? I need to get the color components so that I can convert NSColortoCGColorRef
source
share