note 48137 deleted from function.imagecolorallocate by danbrown
| From: | danbrown@php.net | Date: | Fri, 24 Apr 2009 12:51:41 +0000 |
| Subject: | note 48137 deleted from function.imagecolorallocate by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153670@lists.php.net to get a copy of this message | ||
Note Submitter: carlosreche at yahoo dot com
----
Here is an easier way to set the color without use imagecolorallocate();
<?php
$image = imagecreatetruecolor();
imagefill($image, 0, 0, 0xFFFFFF); // white color (#FFFFFF)
?>
Use hexadecimal values just like you do in HTML codes:
0xFF0000 = red
0x00FF00 = green
0x0000FF = blue
0xFFFF00 = yellow
... and so on
Hope this will help many people...
Carlos Reche