Important: The information in this document is obsolete and should not be used for new development.
CWMatchColors
Matches colors in a color list, using the specified color world.
pascal CMError CWMatchColors ( CMWorldRef cw, CMColor *myColors, unsigned long count);
cw
- A reference to the color world (page 3-66) that describes how matching is to occur in the color-matching session.
myColors
- 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.count
- 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.
DISCUSSION
TheCWMatchColors
function matches colors according to the profiles corresponding to the specified color world. On input, the color values in themyColors
array are assumed to be specified in the data color space of the source profile. On output, the color values in themyColors
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.
SEE ALSO
TheNCWNewColorWorld
function (page 3-108) and theCWConcatColorWorld
function (page 3-110) both create color worlds and return color world references of typeCMWorldRef
.