note 31144 added to function.imagecolorallocate
| From: | Les at rack1 dot php dot net | Date: | Fri, 11 Apr 2003 02:48:14 +0000 |
| Subject: | note 31144 added to function.imagecolorallocate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46479@lists.php.net to get a copy of this message | ||
My little addition to the hex to RGB color festival goin' on up in here:
function set_hex_color($image_handle, $hex_code) {
$hex_code = eregi_replace("#","",$hex_code);
return ImageColorAllocate($image_handle, array(hexdec(substr($hex_code, 0,
2)),hexdec(substr($hex_code, 2, 2)),hexdec(substr($hex_code, 4, 2)));
}
--
http://www.php.net/manual/en/function.imagecolorallocate.php
http://master.php.net/manage/user-notes.php?action=edit+31144
http://master.php.net/manage/user-notes.php?action=delete+31144
http://master.php.net/manage/user-notes.php?action=reject+31144