GetNearestColor function gdi32
The GetNearestColor function retrieves a color value identifying a color from the system palette that will be displayed when the specified color value is used.
COLORREF GetNearestColor(
HDC hdc,
COLORREF color
);
Implementation
int GetNearestColor(int hdc, int color) => _GetNearestColor(hdc, color);