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