Thema: Delphi Farbcodeumwandlung

Einzelnen Beitrag anzeigen

Cyf

Registriert seit: 30. Mai 2008
407 Beiträge
 
Lazarus
 
#13

Re: Farbcodeumwandlung

  Alt 7. Jan 2009, 00:53
Ja hast recht, das war falsch von mir.

Kleiner Test:

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
type
  ColorBytes = array[0..3] of Byte;

var
  aColor: TColor;

  procedure ShowBytes;
  var
    i: Byte;
  begin
    for i := 0 to 3 do
    begin
      Showmessage(IntToStr(ColorBytes(aColor)[i]));
    end;
    Showmessage('----------------------');
  end;

begin
  aColor:= clRed;
  ShowBytes;
  aColor:= clBlue;
  ShowBytes;
  aColor:= clGreen;
  ShowBytes;
end;
  Mit Zitat antworten Zitat