---
title: CMColor
framework: Application Services
role: symbol
role_heading: Union
platforms: [macOS 10.0+]
path: applicationservices/1560453-cmcolor
---

# CMColor

Defines a union that can be used to specify a color value defined by one of the 15 data types supported by the union. 

## Declaration

```occ
typedef union CMColor {
    ...
} CMColor;
```

## Discussion

A color union can contain one of the above fields.

Your application can use a union of type `CMColor` to specify a color value defined by one of the 15 data types supported by the union. Your application uses an array of color unions to specify a list of colors to match, check, or convert. The array is passed as a parameter to the general purpose color matching, color checking, or color conversion functions. The following functions use a color union:

- The function [CWMatchColors](colorsync_manager/1805108-cwmatchcolors.md) matches the colors in the color list array to the data color space of the destination profile specified by the color world.
- The function [CWCheckColors](colorsync_manager/1805111-cwcheckcolors.md) checks the colors in the color list array against the color gamut specified by the color world’s destination profile.
- The color conversion functions, described in “Converting Between Color Spaces”, take source and destination array parameters of type `CMColor` specifying lists of colors to convert from one color space to another.

You do not use a union of type `CMColor` to convert colors expressed in the XYZ color space as values of type `CMFixedXYZ` because the `CMColor` union does not support the `CMFixedXYZ` data type. 

## Topics

### Fields

- [rgb](1560453-cmcolor/1560375-rgb.md)
- [hsv](1560453-cmcolor/1560643-hsv.md)
- [hls](1560453-cmcolor/1560499-hls.md)
- [XYZ](1560453-cmcolor/1560162-xyz.md)
- [Lab](1560453-cmcolor/1560230-lab.md)
- [Luv](1560453-cmcolor/1560443-luv.md)
- [Yxy](1560453-cmcolor/1560266-yxy.md)
- [cmyk](1560453-cmcolor/1560600-cmyk.md)
- [cmy](1560453-cmcolor/1560413-cmy.md)
- [gray](1560453-cmcolor/1560556-gray.md)
- [mc5](1560453-cmcolor/1560305-mc5.md)
- [mc6](1560453-cmcolor/1560495-mc6.md)
- [mc7](1560453-cmcolor/1560175-mc7.md)
- [mc8](1560453-cmcolor/1560330-mc8.md)
- [namedColor](1560453-cmcolor/1560214-namedcolor.md)
