How to find complementary colour for pixel

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Thu Apr 26 06:42:13 EDT 2007


Johny wrote:

> As pictures maybe  different, colour, in the position where I
> write the text, is also different.
> Is there a way how to set the font colour so that it will be seen
> very clearly in the picture?
> For example, if the picture is bright ( for example yellow), the
> font colour should be dark( e.g. black) and vice versa.
> Is there a routine in PIL available  that calculates complementary
> colour for RGB pixel format?

IMHO, this looks weird, especially in complex images. A better
solution is to draw a background box behind the text that has the
image colors, butt low contrast (or saturation, or whatever).

> Can anyone help?

...

Regards,


Björn

-- 
BOFH excuse #405:

Sysadmins unavailable because they are in a meeting talking about
why they are unavailable so much.




More information about the Python-list mailing list