note 7929 modified in ImageColorAllocate by jmoore

From: Date: Thu, 31 Aug 2000 22:50:05 +0000
Subject: note 7929 modified in ImageColorAllocate by jmoore
Groups: php.notes 
Request: Send a blank email to php-notes+get-3826@lists.php.net to get a copy of this message
Cool function to convert from html hex codes (no #; if you have a #, you can remove it before it gets to the function) to binary color codes: function unhexize ($color) { $color=hexdec($color); $red=($color&0xFF0000)>>16; $green = ($color&0xFF00)>>8; $blue = ($color&0xFF); return array ($red, $green, $blue); } http://www.php.net/manual/function.imagecolorallocate.php

« previous php.notes (#3826) next »