Has delphi an RTL function to convert TColor to COLORREF , if not, how can I convert TColor to COLORREF?
COLORREF
Check out the Graphics.ColorToRGB function.
Converts a TColor value to an RGB color representation.Call ColorToRGB to get the RGB color representation for use with Windows API calls. ColorToRGB deletes information that is stored in bits of the highest order, which palette to use for colors that are not always available.
Converts a TColor value to an RGB color representation.
Call ColorToRGB to get the RGB color representation for use with Windows API calls. ColorToRGB deletes information that is stored in bits of the highest order, which palette to use for colors that are not always available.
Use ColorToRGB .
ColorToRGB
Both TColor and COLORREF are 32-bit integers, so no conversion is required.