这个算法以及实现代码网上应该一搜一大把。
Color Functions
The following functions are used with color.
AnimatePalette
CreateHalftonePalette
CreatePalette
GetColorAdjustment
GetNearestColor
GetNearestPaletteIndex
GetPaletteEntries
GetSystemPaletteEntries
GetSystemPaletteUse
HTUI_ColorAdjustment
HTUI_DeviceColorAdjustment
RealizePalette
ResizePalette
SelectPalette
SetColorAdjustment
SetPaletteEntries
SetSystemPaletteUse
UnrealizeObject
UpdateColors