随笔 - 2146  文章 - 19 评论 - 11846 阅读 - 1267万

function RGB2TColor(const R, G, B: Byte): Integer;
begin
  // convert hexa-decimal values to RGB
  Result := R + G shl 8 + B shl 16;
end;


procedure TColor2RGB(const Color: TColor; var R, G, B: Byte);
begin
  R := Color and $FF;
  G := (Color shr 8) and $FF;
  B := (Color shr 16) and $FF;
end;

posted on   万一  阅读(8895)  评论(3编辑  收藏  举报


点击右上角即可分享
微信分享提示