Define
matching colors.
Syntax:
int imagecolorallocate(int im, int red, int green, int blue);
Return value:
Integer
Function type:
Graphics processing
PHP matching color function content description:
This function is used to match the color of graphics and can be used by other drawing functions. The parameter im represents the handle of the graphic. The parameters red, green, and blue are the three primary colors, and their values range from 0 to 255.
Example of using PHP color matching function:
<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></span></li></ol>