Keys →
Functions ↓
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; }?>