src/Color.php
public static function fromHSL($hue, $saturation, $lightness)
    {
        if ($hue < 0 || $hue > 360 ||
            $saturation < 0 || $saturation > 100 ||
            $lightness < 0 || $lightness > 100) {
            throw new InvalidArgumentException('Value $hue can only be 0 to 360, $saturation and $lightness can only be 0 to 100');
        }

        return new self($hue, $saturation, $lightness);
    }
public static function fromHSL($hue, $saturation, $lightness)
    {
        if ($hue < 0 || $hue > 360 ||
            $saturation < 0 || $saturation > 100 ||
            $lightness < 0 || $lightness > 100) {
            throw new InvalidArgumentException('Value $hue can only be 0 to 360, $saturation and $lightness can only be 0 to 100');
        }

        return new self($hue, $saturation, $lightness);
    }
public static function fromHSL ( $ hue , $ saturation , $ lightness ) { if ( $ hue < 0 || $ hue > 360 || $ saturation < 0 || $ saturation > 100 || $ lightness < 0 || $ lightness > 100 ) { throw new InvalidArgumentException ( 'Value $hue can only be 0 to 360, $saturation and $lightness can only be 0 to 100' ) ; } return new self ( $ hue , $ saturation , $ lightness ) ; }
Creates a Color instance based on the given HSL-formatted color.

@param int $hue        (0-360) The hue of the color (format: HSL)
@param int $saturation (0-100) The saturation of the color (format: HSL)
@param int $lightness  (0-100) The lightness of the color (format: HSL)

@return Color
Creates a Color instance based on the given HSL - formatted color .