/** * Mixes this color with a given one and returns the new mixed color * * @param Color $color the color to mix with * * @return Color the new mixed color * */ public function mix(ImageColor $color) { return new self(round(($this->r + $color->r()) / 2), round(($this->g + $color->g()) / 2), round(($this->b + $color->b()) / 2)); }