10-06-2012, 06:28 PM
وعليكم السلام اخي
بالتوفيق
PHP كود :
function ColortoHtml(col:Tcolor):String;
var
tmpRGB : TColorRef;
begin
tmpRGB := ColorToRGB(col) ;
Result:=Format('#%.2x%.2x%.2x',
[GetRValue(tmpRGB),
GetGValue(tmpRGB),
GetBValue(tmpRGB)]) ;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if ColorDialog1.Execute then
Label1.Caption:=ColorToHtml(ColorDialog1.Color) ;
end;
بالتوفيق
وتعاونوا على البر و التقوى ، ولا تعاونوا على الاثم والعدوان

