Page 1 of 1

Imagick colorizeImage Hex darker

Posted: 2011-11-19T15:52:29-07:00
by pelelive
Hi all,

I use PHP and Imagick to change the color of a transparent PNG. The image in the PNG is a simple shape with a transparent background.

I use the colorizeImage function to change the color.

Code: Select all

$img = new Imagick("shape.png"); 
$img->colorizeImage("#99ccff", 1); 
The problem is that Imagick show a dark version of my HEX code (#99ccff)?

Is there a way to get the exact color (#99ccff)?

(my PNG is PNG 32 - and the shape is black)

here is my file: http://www.2shared.com/photo/N3rGdoHG/shape3.html

If you have a better way to change the color of a png file with a one color shape, please post it.

Thank you for all your help!

Re: Imagick colorizeImage Hex darker

Posted: 2012-01-24T22:04:01-07:00
by fmw42
$img->colorizeImage("#99ccff", 1);

Perhaps specify the opacity value as a float.


$img->colorizeImage("#99ccff", 1.0);