Allocate image color
<?php
$image = imagecreatefrompng("button.png");
$hotpink = imagecolorallocate($image, 255, 110, 221);
$rotated_image = imagerotate($image, 50, $hotpink);
header("content-type: image/png");
imagepng($rotated_image);
imagedestroy($image);
imagedestroy($rotated_image);
?>
Related examples in the same category