function mycolor(col:longint):longint;stdcall;
var f: TForm1;
r,g,b:integer;
begin
f:=Tform1.Create(nil);
f.panel1.Color:=col;
f.edit1.Text:=inttostr(f.panel1.Color);
b:=(col and $00ff0000) shr 16;
g:=(col and $0000ff00) shr 8;
r:=(col and $000000ff);
f.ScrollBar1.Position:=r;
f.ScrollBar2.Position:=g;
f.ScrollBar3.Position:=b;
result:=color1;
f.showmodal;
freeandnil(f);
end;