function HexColorToHtmlColor(c: Integer): string; var tmpRGB : TColorRef; begin tmpRGB := ColorToRGB(c) ; Result:=Format('#%.2x%.2x%.2x', [GetRValue(tmpRGB), GetGValue(tmpRGB), GetBValue(tmpRGB)]) ; end;