Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-colorShade

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  colorShade   Lines 599-618 (19 lines)Added: 2012-03-10 file  utils.php   Last mod: Fri 2021-05-14 21:45:07

function colorShade $c1$c2$pc )
        {
#-k     color
#-      Find the shade that lies partway between 2 colors
#-p     $c1     - req   - color channel, 0-255
#-p     $c2     - req   - color channel, 0-255
#-p     $pc     - req   - % distance, expressed 0 .. 1
#-p             - ret   - The shade (0-127) that lies % distance from $c1 to $c2
#-d     03/10/12 Added

        
if ($pc 0) return $c1;
        if (
$pc 1) return $c1;
        if (
$c1 == $c2) return $c1;
        
$d1 fix(abs($c1-$c2) * $pc);
        if (
$c1 $c2)  $d2 $c1 $d1;
        else            
$d2 $c1 $d1;
        
        return 
$d2;
        }

?>