private function LightenColor($color, $amount)
    {
        $newColor = $color + (0xff - $color) * $amount;
        return min(max(round($newColor), 0x00), 0xff);
    }
private function LightenColor($color, $amount)
    {
        $newColor = $color + (0xff - $color) * $amount;
        return min(max(round($newColor), 0x00), 0xff);
    }
private function LightenColor ( $ color , $ amount ) { $ newColor = $ color + ( 0xff - $ color ) * $ amount ; return min ( max ( round ( $ newColor ) , 0x00 ) , 0xff ) ; }
Lightens a single color part
@param int $color The color part (range 0-255)
@param float $amount The amount of lightening (range 0-1)
@return int Returns the lightened color
Lightens a single color part