[magick-users] Automagically determining font-color
Mark
asarian at xs4all.nl
Sat Apr 12 05:20:22 PDT 2008
Hello
I was wondering if anyone knows how to calculate a legible font-color,
once I've determined the mean color of the image (for a title bar).
I've experimented a bit with calculating the font color (white/black) for
when the title bar color is nearest a color in the 216 'safe' HTML color
table. But the result, though workable, to a degree, still leaves to be
desired, in that sometimes I really think the font color should be white
instead of black, and vice versa.
So, is there perhaps an algorithm out there I'm unaware of? Or a refined
lookup table of some sort.
Thanks,
- Mark
More information about the Magick-users
mailing list