Einzelnen Beitrag anzeigen

Markus K.

Registriert seit: 26. Jan 2004
Ort: Halle
346 Beiträge
 
Delphi 2005 Personal
 
#2

Re: FARBMIXER ColorToHex...

  Alt 30. Mär 2004, 20:29
Hallo Nico,
ich bin mir nicht ganz sicher aber wiefolgt müsste es gehen.
Delphi-Quellcode:
var Ergebnis:String;
begin
     Ergebnis:='$00'+IntToHex(blau,2)+IntToHex(gruen,2)+IntToHex(rot,2);
end;
Wenn du es so machst, bekommst du als Rückgabewert einen LongInt, welcher identisch mit TColor ist.
Delphi-Quellcode:
var Ergebnis:LongInt;
begin
     Ergebnis:=StrToInt('$00'+IntToHex(blau,2)+IntToHex(gruen,2)+IntToHex(rot,2));
end;
Tschüß Markus
  Mit Zitat antworten Zitat