note 12156 deleted from function.dechex by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 20:38:09 +0000 |
| Subject: | note 12156 deleted from function.dechex by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134205@lists.php.net to get a copy of this message | ||
Note Submitter: gurke at bigfoot dot com
----
usefull if you need to convert decimal colors to html style hex colors:
function hexColor($color) {
return sprintf("%02X%02X%02X",$color[0],$color[1],$color[2]);
}
example:
$col[0] = 25;
$col[1] = 255;
$col[2] = 55;
print hexColor($col);