WORD GetNearestPaletteIndex(hPalette,crColor)
This function returns the index of the entry in a logical palette which most closely matches a color value.
| Parameter | Type/Description |
| hPalette | HPALETTE Identifies the logical palette. | |
| crColor | COLORREF Specifies the color to be matched. |
The return value is the index of an entry in a logical palette. The entry contains the color which most nearly matches the specified color.