Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Challenge

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:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial