procedure TForm1.Button1Click(Sender: TObject);
var
s:TColor;
inifile: TiniFile;
s1:string;
begin
inifile := Tinifile.Create('d:/temp/a.ini');
if ColorDialog1.Execute then
begin
s := ColorDialog1.Color;
inifile.Writestring('Version', 'Color', colortostring(s));
end;
inifile.Free;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
s:string;
inifile: TiniFile;
begin
inifile := Tinifile.Create('d:/temp/a.ini');
s := inifile.Readstring('Version', 'Color', '');
memo1.Color := StringToColor(s);
inifile.Free;
end;