delphi RGB与TColor的转换
2021-02-08 17:17
标签:black nbsp object rgb bsp UNC col and color delphi RGB与TColor的转换 标签:black nbsp object rgb bsp UNC col and color 原文地址:https://www.cnblogs.com/blogpro/p/11345939.html1.RGB转换为Tcolor
function RGBToColor(R,G,B: byte): Tcolor;
begin
Result := B Shl 16 or G shl 8 or R;
end;
2.Tcolor转换为RGB
proceudre Tform1.Button1Clink(Sender: Tobject);
var
Color: TColor;
R, G, B: integer;
begin
Color := ClBlack;
R := Color and $FF;
G := (Color and $FF00) shr 8;
B := (Color and $FF0000) shr 16;
end;
下一篇:Delphi GDI(一)
文章标题:delphi RGB与TColor的转换
文章链接:http://soscw.com/index.php/essay/52736.html