PHP imagecolorclosest - 取得与指定的颜色最接近的颜色的索引值

PHP 教程 · 2019-01-31 10:42:10

imagecolorclosest — 取得与指定的颜色最接近的颜色的索引值。

语法

int imagecolorclosest ( resource $image , int $red , int $green , int $blue )

返回图像调色板中与指定的 RGB 值最"接近"的颜色。

指定的颜色与调色板中的每个颜色的"距离"的计算方法是把 RGB 值当成三维空间中点的坐标。

如果从文件创建了图像,只有图像中使用了的颜色会被辨析。仅出现在调色板中的颜色不会被辨析。

相关文章

  • imagecolorexact() 取得指定颜色的索引值。

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Advanced Web Metrics with Google Analytics

Advanced Web Metrics with Google Analytics

Brian Clifton / Sybex / 2008 / USD 39.99

Are you getting the most out of your website? Google insider and web metrics expert Brian Clifton reveals the information you need to get a true picture of your site's impact and stay competitive usin......一起来看看 《Advanced Web Metrics with Google Analytics》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具