src/Modules/Imager/GDDriver.php
public function colorize($color, $opacity = 0)
    {
        $color = $this->normalizeColor($color);
        if (false === imagefilter(
                $this->image_handler,
                IMG_FILTER_COLORIZE,
                $color[0],
                $color[1],
                $color[2],
                $opacity
            )
        ) {
            throw new \RuntimeException('Failed to colorize the image');
        }
        return $this;
    }
public function colorize($color, $opacity = 0)
    {
        $color = $this->normalizeColor($color);
        if (false === imagefilter(
                $this->image_handler,
                IMG_FILTER_COLORIZE,
                $color[0],
                $color[1],
                $color[2],
                $opacity
            )
        ) {
            throw new \RuntimeException('Failed to colorize the image');
        }
        return $this;
    }
@param string $color
@param integer $opacity

@return $this
@throws \RuntimeException