Delphi转换 TColor 到 HTML 颜色串


本文整理自网络,侵删。

 
//转换 TColor 到 HTML 颜色串
 
 
function ColorToHtml(color:TColor):string;
var
  RgbColor : TColorRef;
begin
    RgbColor := ColorToRGB(color);
    Result:=Format('#%.2x%.2x%.2x',[GetRValue(RgbColor),GetGValue(RgbColor),GetBValue(RgbColor)]);
end;

相关阅读 >>

Delphi webbroker iis cgi 的配置

Delphi webbrowser添加到收藏夹

Delphi写的一个屏幕截取函数

Delphi image 等比例缩小

Delphi 如何读取内存中的数据?

Delphi speedbutton按钮动态加载图片(从image和imagelist)

Delphi取得文件图标并在tlistview中显示

Delphi源码webbrowser多次执行documentcomplete

Delphi 为idhttp伪造session

Delphi怎么实现一定范围内的随机数呢?

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...