Lines Matching defs:lightness
24 private $lightness;
30 * @param float|int $lightness
32 public function __construct($hue, $saturation, $lightness)
36 $this->lightness = $lightness;
40 public static function createFromChannels(float $hue, float $saturation, float $lightness): ColorHsl
42 return new ColorHsl($hue, $saturation, $lightness);
47 return $this->lightness;
68 $this->lightness = $int;
83 $lightness = $this->lightness / 100;
87 $chroma = (1 - abs(2 * $lightness - 1)) * $saturation;
89 $m = $lightness - ($chroma / 2);
160 return "hsl($this->hue deg, $this->saturation%, $this->lightness%)";
163 public function darken(int $lightness = 5): ColorHsl
165 if ($this->lightness - $lightness < 0) {
166 $this->lightness = 0;
168 $this->lightness -= $lightness;