CWMatchColorsMatches 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
- function result
- A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
CWMatchColorsfunction matches colors according to the profiles corresponding to the specified color world. On input, the color values in the
myColorsarray are assumed to be specified in the data color space of the source profile. On output, the color values in the
myColorsarray 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.
NCWNewColorWorldfunction (page 3-108) and the
CWConcatColorWorldfunction (page 3-110) both create color worlds and return color world references of type