Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Matching Colors Using Low-Level Functions Without QuickDraw /


Matches colors in a color list, using the specified color world.

pascal CMError CWMatchColors (
CMWorldRef cw,
CMColor *myColors,
unsigned long count);
A reference to the color world (page 3-66) that describes how matching is to occur in the color-matching session.
A pointer to an array containing a list of colors (page 3-59). On input, contains the list of colors to match. On output, contains the list of matched colors specified in the color data space of the color world's destination profile.
A one-based count of the number of colors in the color list of the myColors array.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
The CWMatchColors function matches colors according to the profiles corresponding to the specified color world. On input, the color values in the myColors array are assumed to be specified in the data color space of the source profile. On output, the color values in the myColors array are transformed to the data color space of the destination profile.

All color management modules (CMM)s must support this function. To determine which CMM to use for the color-matching session, the ColorSync Manager follows the arbitration scheme described in "Introduction to the ColorSync Manager" in Advanced Color Imaging on the Mac OS.

This function supports color-matching sessions set up with one of the multichannel color data types.

The NCWNewColorWorld function (page 3-108) and the CWConcatColorWorld function (page 3-110) both create color worlds and return color world references of type CMWorldRef.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996