Can anyone tell me why this colorUsingColorSpaceName is returning 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 can I convert an NSColor in the NSNamedColorSpace? I need to be able to get the color components so i can convert an NSColor to a CGColorRef