I have used this function to RGB:
type
RGBColor = record
Red :integer;
Green :integer;
Blue :integer;
end;
function FindRGB(Color: TColor): RGBColor;
var
R,G,B : Integer;
begin
R := Color and $ff;
G := (Color and $ff00) shr 8;
B := (Color and $ff0000) shr 16;
Result.Red := R;
Result.Green := G;
Result.Blue := B;
end;