NSColor(HTML) Category Reference
Converts a CGColorRef into an NSColor by placing each component into an NSColor and pending on the component count to return a grayscale or rgb color. If there are not 2 (grayscale) or 4 (rgba) components the color is from an unsupported color space and nil is returned.
+ (NSColor *)colorWithCGColor:(CGColorRef)cgColor
The CGColorRef to convert
An NSColor of this CGColorRef