[This is preliminary documentation and subject to change.]
This group of structures is used to specify colors for translation.
struct GRAYCOLOR {
WORD gray;
};
struct RGBCOLOR {
WORD red;
WORD green;
WORD blue;
};
struct CMYKCOLOR {
WORD cyan;
WORD magenta;
WORD yellow;
WORD black;
};
struct XYZCOLOR {
WORD X;
WORD Y;
WORD Z;
};
struct YxyCOLOR {
WORD Y;
WORD x;
WORD y;
};
struct LabCOLOR {
WORD L;
WORD a;
WORD b;
};
struct GENERIC3CHANNEL {
WORD ch1;
WORD ch2;
WORD ch3;
};
struct NAMEDCOLOR {
DWORD dwIndex;
};
struct HiFiCOLOR {
BYTE channel[MAX_COLOR_CHANNELS];
};
typedef union tagCOLOR {
struct GRAYCOLOR gray;
struct RGBCOLOR rgb;
struct CMYKCOLOR cmyk;
struct XYZCOLOR XYZ;
struct YxyCOLOR Yxy;
struct LabCOLOR Lab;
struct GENERIC3CHANNEL gen3ch;
struct NAMEDCOLOR named;
struct HiFiCOLOR hifi;
} COLOR;
A variable of type COLOR may be accessed as any of the supported color space colors by accessing the appropriate member of the union. For instance, given the following variable declaration
COLOR aColor;
The red, green and blue values could be set in the following manner:
aColor.rgb.red=100;
aColor.rgb.green=50;
aColor.rgb.blue=2;
Color Management Overview, ICM 2.0 Structures