note 48070 added to function.hexdec

From: Date: Fri, 10 Dec 2004 15:14:31 +0000
Subject: note 48070 added to function.hexdec
Groups: php.notes 
Request: Send a blank email to php-notes+get-81651@lists.php.net to get a copy of this message
Here is a function to brighten up any color: function lighten_up($orig_color, $fraction_denom){ // return the color between the color and white // based on the fraction denom that is passed if(!isset($fraction_denom)) $fraction_denom = 2; $highest_val = hexdec("FF"); $r = hexdec(substr($orig_color,0,2)); $r = ($highest_val-$r)/$fraction_denom + $r; $g = hexdec(substr($orig_color,2,2)); $g = ($highest_val-$g)/$fraction_denom + $g; $b = hexdec(substr($orig_color,4,2)); $b = ($highest_val-$b)/$fraction_denom + $b; return dechex($r) . dechex($g) . dechex($b); } ---- Manual Page -- http://www.php.net/manual/en/function.hexdec.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48070 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48070&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48070&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48070&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48070&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48070&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48070&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48070&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#81651) next »