Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Color objects come from particular color spaces. Asking for the red, green, and blue components is possible only if the color is from an RGB-based color space, like NSCalibratedRGBColorSpace. Thus, if the user uses the color panel's CMYK view or Black/White view to choose a color, your formatter will fail to name the resulting color. Fix this problem.
NSColor has the following methods: