Home > php教程 > php手册 > PHP匹配颜色函数的使用技巧

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:10:35
Original
1214 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

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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template