Pop\Color\Space\Lab::__construct PHP Метод

__construct() публичный Метод

Instantiate the LAB color object
public __construct ( integer $l, integer $a, integer $b ) : Lab
$l integer
$a integer
$b integer
Результат Lab
    public function __construct($l, $a, $b)
    {
        $max = max($l, $a, $b);
        $min = min($l, $a, $b);
        if ($l > 100 || $l < 0 || $max > 127 || $min < -128) {
            throw new Exception('One or more of the color values is out of range.');
        }
        $this->l = (int) $l;
        $this->a = (int) $a;
        $this->b = (int) $b;
    }