COLORREF GetNearestColor(hdc, clrref) | |||||
HDC hdc; | /* handle of device context | */ | |||
COLORREF clrref; | /* color to match, */ |
The GetNearestColor function retrieves the solid color that best matches a specified logical color; the given device must be able to represent this solid color.
hdc
Identifies the device context.
clrref
Specifies the color to be matched.
The return value specifies an RGB (red, green, blue) color value that defines the solid color closest to the clrref value that the device can represent.