procedure TForm1.Button1Click(Sender: TObject);
var
Mas: array [1 .. 3] of TColor;
TS: TComponent;
i: integer;
begin
for i := 1 to 3 do
begin
TS := FindComponent('Shape' + IntToStr(i));
Mas[i] := (TS as TShape).Brush.Color;
TS := FindComponent('Shape' + IntToStr(i + 3));
(TS as TShape).Brush.Color := Mas[i];
end;
end;