private function _colorBlend($imagickInstance, $color, $alpha = 1, $composite_flag = \Imagick::COMPOSITE_COLORIZE)
{
$draw = new \ImagickDraw();
$draw->setFillColor($color);
$width = $imagickInstance->getImageWidth();
$height = $imagickInstance->getImageHeight();
$draw->rectangle(0, 0, $width, $height);
$temporary = new \Imagick();
$temporary->setBackgroundColor(new \ImagickPixel('transparent'));
$temporary->newImage($width, $height, new \ImagickPixel('transparent'));
$temporary->setImageFormat('png32');
$temporary->drawImage($draw);
$alphaChannel = clone $imagickInstance;
$alphaChannel->setImageAlphaChannel(\Imagick::ALPHACHANNEL_EXTRACT);
$alphaChannel->negateImage(false, \Imagick::CHANNEL_ALL);
$imagickInstance->setImageClipMask($alphaChannel);
$clone = clone $imagickInstance;
$clone->compositeImage($temporary, $composite_flag, 0, 0);
$clone->setImageOpacity($alpha);
$imagickInstance->compositeImage($clone, \Imagick::COMPOSITE_DEFAULT, 0, 0);
}