note 9180 added to hexdec
| From: | joe at aigraphics dot com | Date: | Fri, 20 Oct 2000 19:32:14 +0000 |
| Subject: | note 9180 added to hexdec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6766@lists.php.net to get a copy of this message | ||
Here is a fast block of code to convert HTML Style HEX colors to RGB:
--------------------
$r = hexdec(substr($color, 0, 2));
$g = hexdec(substr($color, 2, 2));
$b = hexdec(substr($color, 4, 2));
--------------------
hope it helps you, enjoy.
http://www.php.net/manual/function.hexdec.php