[Delphi (Object Pascal)] Delphi转换颜色对象为html格式 →→→→→进入此内容的聊天室

来自 , 2020-07-05, 写在 Delphi (Object Pascal), 查看 134 次.
URL http://www.code666.cn/view/c4f8a2db
  1. function ColorToHTML(const Color: Graphics.TColor): string;
  2. var
  3.   ColorRGB: Integer;
  4. begin
  5.   ColorRGB := Graphics.ColorToRGB(Color);
  6.   Result := SysUtils.Format(
  7.     '#%0.2X%0.2X%0.2X',
  8.     [Windows.GetRValue(ColorRGB),
  9.     Windows.GetGValue(ColorRGB),
  10.     Windows.GetBValue(ColorRGB)]
  11.   );
  12. end;
  13. //delphi/2258

回复 "Delphi转换颜色对象为html格式"

这儿你可以回复上面这条便签

captcha