src/SyHolloway/MrColor/Extension/Toolkit.php
public function darken(Color $color, $amount = null)
    {
        $current = $color->lightness;

        $amount = ($amount === null) ? self::DEFAULT_ADJUST : $amount ;

        $amount = intval($amount) / 100;

        $new = $current - $amount;

        $new = ($new < 0) ? 0 : $new;

        $new = ($new > 1) ? 1 : $new;

        $color->lightness = floatval($new);

        return $color;
    }
public function darken(Color $color, $amount = null)
    {
        $current = $color->lightness;

        $amount = ($amount === null) ? self::DEFAULT_ADJUST : $amount ;

        $amount = intval($amount) / 100;

        $new = $current - $amount;

        $new = ($new < 0) ? 0 : $new;

        $new = ($new > 1) ? 1 : $new;

        $color->lightness = floatval($new);

        return $color;
    }
public function darken ( Color $ color , $ amount = null ) { $ current = $ color -> lightness ; $ amount = ( $ amount === null ) ? self :: DEFAULT_ADJUST : $ amount ; $ amount = intval ( $ amount ) / 100 ; $ new = $ current - $ amount ; $ new = ( $ new < 0 ) ? 0 : $ new ; $ new = ( $ new > 1 ) ? 1 : $ new ; $ color -> lightness = floatval ( $ new ) ; return $ color ; }
Darkens color by a percentage a given Color object

@param object $color Color object
@param integer
@return object Color
Darkens color by a percentage a given Color object