function ColorToHex(color: TColor):string;
begin
result := inttohex(colortorgb(color), 6);
result := copy(result, 5, 2) + copy(result, 3, 2) + copy(result, 1, 2);
end;
...
s := ColorToHex(clRed);
R := copy(s, 1, 2);
G := copy(s, 3, 2);
B := copy(s, 5, 2);