Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

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


Converting Between Color Spaces

Color conversion, which does not require the use of color profiles, is a much simpler process than color matching. The ColorSync Manager provides functions your application can call to convert a list of colors within the same base family--that is, between a base color space and any of its derived color spaces or between two derivatives of the same base family.

You can convert a list of colors between XYZ and any of its derived color spaces, which include L*a*b*, L*u*v*, and Yxy, or between any two of the derived color spaces. You can also convert colors defined in the XYZ color space between CMXYZColor data types in which the color components are expressed as 16-bit unsigned values and CMFixedXYZColor data types in which the colors are expressed as 32-bit signed values.

You can convert a list of colors between RGB, which is the base-additive device-dependent color space, and any of its derived color spaces, such as HLS, HSV, and Gray, or between any two of the derived color spaces.

Note
The color conversion functions do not support conversion of HiFi colors.
Here are brief descriptions of the XYZ color space and its derivative color spaces:

Here are brief descriptions of the RGB color space and its derivative color spaces:

To convert colors from one color space to another, you don't need to specify source and destination profiles. Instead, you just call the appropriate ColorSync Manager function to convert between the desired color spaces.

Note
Prior to version 2.1, the ColorSync Manager used a component to implement color conversion. An application had to open a connection to the component with the Component Manager, then pass the component instance as a parameter to the color conversion functions. For example, the CMXYZToLab function performs the same conversion as CMConvertXYZToLab, but takes a first parameter of
ComponentInstance ci
For backward compatibility, component-based color conversion functions such as CMXYZToLab are still supported. However, their use is discouraged, and they are not guaranteed to work in future versions.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996