Thema: Delphi RGB aus Farbe auslesen

Einzelnen Beitrag anzeigen

MasterC

Registriert seit: 9. Jan 2004
Ort: Krefeld
369 Beiträge
 
Delphi 2005 Personal
 
#7

Re: RGB aus Farbe auslesen

  Alt 12. Mär 2004, 19:30
Delphi-Quellcode:
function colortorgbcode(Farbe: TColor);
var
  Color: Longint;
  r, g, b: Byte;
begin
  Color := ColorToRGB(Farbe);
  r := Color;
  g := Color shr 8;
  b := Color shr 16;
  Result:= (Inttostr(r) + ',' + Inttostr(g) + ',' + Inttostr(b));
end;
end;
Edit: Mist zu spät. ^^
Christian H.
www.Future-Coding.de
  Mit Zitat antworten Zitat