Home > php教程 > php手册 > body text

PHP匹配颜色函数的使用技巧

WBOY
Release: 2016-06-13 11:10:35
Original
1161 people have browsed it

定义

匹配颜色。

语法:

int imagecolorallocate(int im, int red, int green, int blue);

返回值:

整数

函数种类:

图形处理

PHP匹配颜色函数内容说明:

本函数用来匹配图形的颜色,供其它绘图函数使用。参数 im 表示图形的 handle。参数 red、green、blue 是色彩三原色,其值从 0 至 255。

PHP匹配颜色函数使用范例:

<ol class="dp-xml">
<li class="alt"><span><span class="tag"><span> ?  </span></span></span></li>
<li>
<span>$</span><span class="attribute">white</span><span> = </span><span class="attribute-value">imagecolorallocate<br></span><span>($im, 255,255,255);  </span>
</li>
<li class="alt">
<span>$</span><span class="attribute">black</span><span> = </span><span class="attribute-value">imagecolorallocate<br></span><span>($im, 0,0,0);  </span>
</li>
<li>
<span class="tag">?></span><span> </span>
</li>
</ol>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template