function HexColorToHtmlColor(c: Integer): string; var R,G,B: Byte; begin R := c and $FF; G := (c shr 8) and $FF; B := (c shr 16) and $FF; Result := #35 + Format('%.2x%.2x%.2x',[r,g,b]); end;
function colortohexcolor(c:Integer):String ; const Digits : array[0..$F] of Char = '0123456789ABCDEF'; var rr,gg,bb : byte; begin rr := getRvalue(c); {分解红色分量} gg := getGvalue(c); {分解绿色分量} bb := getBvalue(c); {分解蓝色分量} Result:= '#' + Digits[rr shr 4] + Digits[rr and $F] + Digits[gg shr 4] + Digits[gg and $F] + Digits[bb shr 4] + Digits[bb and $F];{显示相应十六进制数值}
end;
procedure TForm1.Button1Click(Sender: TObject); begin