TDirectDrawSurface
function ColorMatchRGB( rgb: COLORREF ): Longint;
This method converts a RGB color to a physical color. Returns the value that is set in the surface memory that corresponds to the rgb color.