[This is preliminary documentation and subject to change.]
The CheckColorsInGamut function determines whether a specified set of RGB triples lies in the output gamut of a specified device. The RGB triples are interpreted in the input logical color space.
BOOL WINAPI CheckColorsInGamut(
HDC hDC, // device context handle
LPVOID lpRGBTriples, // array of RGB triples
LPVOID lpBuffer, // buffer for results
UINT nCount // number of triples
);
If this function succeeds, the return value is a nonzero value.
If this function fails, the return value is zero.
The function places the test results in the buffer pointed to by lpBuffer. Each byte in the buffer corresponds to an RGB triple, and has an unsigned value between 0 and 255. The value 0 denotes that the color is in gamut, while a nonzero value denotes that it is out of gamut. For any integer n such that 0 < n < 255, a result value of n + 1 indicates that the corresponding color is at least as far out of gamut as would be indicated by a result value of n, as specified by the ICC Profile Format Specification. For more information on the ICC Profile Format Specification, see the sources listed in Other Color Management Information Sources.
Note that for this function to succeed, ICM must be enabled for the device context handle that is passed in through the hDC parameter. ICM can be enabled for a device context handle by calling the SetICMMode function.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Color Management Overview, ICM 2.0 Functions, SetICMMode