Mikko Koppanen has another blog entry posted dealing with image manipulation with PHP and Imagick, this time it's a cool little script that lets you pick your watermark's color based on the image's background luminosity.
Usually images are watermarked using a predefined color (let's say for example "white"). How well does this actually work when you're doing the watermark on a light or even a white image? The answer is simple: not very well.
His example uses the ImagickPixelIterator to check the luminosity of the background and assigns the text a value between black and white according to the background. Complete code with usage and examples of the resulting images are included.