[TRUCO DELPHI] TColor a HEX y Viceversa.
delphi
function TColorToHex(Color : TColor) : string; begin Result := IntToHex(GetRValue(Color), 2) + IntToHex(GetGValue(Color), 2) + IntToHex(GetBValue(Color), 2); end; function HexToTColor(sColor : string) : TColor; begin Result := RGB( StrToInt('$'+Copy(sColor, 1, 2)), StrToInt('$'+Copy(sColor, 3, 2)), StrToInt('$'+Copy(sColor, 5, 2)) ); end;
Saludos!