note 3965 deleted from ImageColorAllocate by jmoore

From: Date: Thu, 31 Aug 2000 22:49:27 +0000
Subject: note 3965 deleted from ImageColorAllocate by jmoore
Groups: php.notes 
Request: Send a blank email to php-notes+get-3825@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: <pre> function unhexize ($color) { $red = (int)(hexdec($color)/65536); $temp = hexdec($color) - ($red * 65536); $green = (int)($temp/256); $blue = $temp - ($green * 256); return array ($red, $green, $blue); } </pre>

« previous php.notes (#3825) next »