Registriert seit: 12. Aug 2003
Ort: Soest
4.037 Beiträge
Delphi 10.1 Berlin Enterprise
|
Re: ColorBox - Color zu Hexcolor machen
12. Jul 2004, 13:58

Zitat von alcaeus:
Sharky hat Recht. TColor speichert Daten nicht im RGB-Format, sondern komplett anders. Du musst wie folgt vorgehen:
Delphi-Quellcode:
var
r, g, b: Byte;
aColor: TColor;
RGB: String[6];
begin
ColorToRGB(aColor, r, g, b);
RGB := IntToHex(r, 2)+IntToHex(g, 2)+IntToHex(b, 2);
end;
Greetz
alcaeus
 Klappt das nicht gleich so?
IntToHex(ColorToRGB(ColorBox1.Selected), 6));
|
|
Zitat
|