Exemple #1
0
 /**
  * @param int $hue
  * @return $this
  */
 public function withHue($hue)
 {
     $color = clone $this;
     $color->hue = MathUtil::rotateValue($hue, 360);
     return $color;
 }
Exemple #2
0
 public function __construct($hue, $saturation)
 {
     $this->hue = MathUtil::rotateValue($hue, 360);
     $this->saturation = MathUtil::capValue($saturation, 0.0, 1.0);
 }