ColorToRgb converts a TColor value to its RGB values. To convert RGB values to a TColor, use the RgbToColor function.
void ColorToRgb(
const TColor color,
unsigned char& red,
unsigned char& green,
unsigned char& blue )
{
red = GetRValue(color);
green = GetGValue(color);
blue = GetBValue(color);
}