public static function fromHslCompensated($hue, $saturation, $lightness, $alpha = 1.0)
    {
        if ($hue < 0) $hue = 0;
        if ($hue > 1) $hue = 1;
        
        $lightnessCompensation = self::$lightnessCompensations[(int)($hue * 6 + 0.5)];
        
        // Adjust the input lightness relative to the compensation
        $lightness = $lightness < 0.5 ?
            $lightness * $lightnessCompensation * 2 : 
            $lightnessCompensation + ($lightness - 0.5) * (1 - $lightnessCompensation) * 2;

        return self::fromHsl($hue, $saturation, $lightness, $alpha);
    }
public static function fromHslCompensated($hue, $saturation, $lightness, $alpha = 1.0)
    {
        if ($hue < 0) $hue = 0;
        if ($hue > 1) $hue = 1;
        
        $lightnessCompensation = self::$lightnessCompensations[(int)($hue * 6 + 0.5)];
        
        // Adjust the input lightness relative to the compensation
        $lightness = $lightness < 0.5 ?
            $lightness * $lightnessCompensation * 2 : 
            $lightnessCompensation + ($lightness - 0.5) * (1 - $lightnessCompensation) * 2;

        return self::fromHsl($hue, $saturation, $lightness, $alpha);
    }
public static function fromHslCompensated ( $ hue , $ saturation , $ lightness , $ alpha = 1.0 ) { if ( $ hue < 0 ) $ hue = 0 ; if ( $ hue > 1 ) $ hue = 1 ; $ lightnessCompensation = self :: $ lightnessCompensations [ ( int ) ( $ hue * 6 + 0.5 ) ] ; // Adjust the input lightness relative to the compensation $ lightness = $ lightness < 0.5 ? $ lightness * $ lightnessCompensation * 2 : $ lightnessCompensation + ( $ lightness - 0.5 ) * ( 1 - $ lightnessCompensation ) * 2 ; return self :: fromHsl ( $ hue , $ saturation , $ lightness , $ alpha ) ; }
Creates a Color> instance from HSL color parameters and will compensate
the lightness for hues that appear to be darker than others.

@param float $hue Hue in the range [0, 1].
@param float $saturation Saturation in the range [0, 1].
@param float $lightness Lightness in the range [0, 1].
@param float $alpha Alpha channel value in the range [0, 1].
Creates a Color > instance from HSL color parameters and will compensate the lightness for hues that appear to be darker than others .