delphi 判断一个颜色是否是亮色
2022-12-26 10:51:12 作者:admin
本文整理自网络,侵删。
function IsLightColor(const AColor: TColor): Boolean;
var
r, g, b, yiq: integer;
begin
r := GetRValue(AColor);
g := GetGValue(AColor);
b := GetBValue(AColor);
yiq := ((r*299)+(g*587)+(b*114)) div 1000;
if (yiq >= 128) then
result := True
else
result := False;
end;
来源:http://www.xuexidashi.vip/h-nd-1757.html#_np=157_1996
相关阅读 >>
Delphi android检查互联网连接
Delphi强制应用非一次性载入的注册表设置
Delphi 自带的 base64 编解码函数
Delphi 文件转换base64
Delphi if语法,弹出提示框,不等于写法,判断是否为空
Delphi 检查屏幕是否处于锁屏或关闭状态
Delphi edit只允许输入数字
Delphi暴力关机代码
Delphi 如何设置热键
Delphi 禁用本地网络连接/启用本地网络连接
更多相关阅读请进入《Delphi》频道 >>
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码