Autor Beitrag
Hux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 171



BeitragVerfasst: Sa 02.07.05 11:52 
Erstmal Hallöchen...
Wie kann ich eine Delphi Farbe zu einer HTML Farbe konvertieren.
Z.B.: clBlue --> #0000FF
Antwortet mir...
Danke.,..
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Sa 02.07.05 12:48 
Hallo,

erstmal :welcome:
So geht das:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var aColor : Integer;
    s      : String;
begin
  aColor := clred;
  //aColor := $00DDD0BD;//oder auch so
  s := Format('#%.2x%.2x%.2x',
                     [aColor and $FF,
                     (aColor shr 8) and $FF,
                     (aColor shr 16) and $FF])
  showmessage(s);


Ps.: Eine Suche nach Color und HTML hier im Forum hätte Dir auch geholfen :wink:

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Hux Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 171



BeitragVerfasst: Sa 02.07.05 15:21 
Titel: Frage beantwortet
Danke...
Es funktioniert...

...
Jo...das nächste mal werde ich hier im Forum halt mal suchen
wie du es gesagt hat... :)