hi :) On Thu, May 06, 2004 at 09:35:13PM +0200, Mikael Carneholm wrote: > (example for 8-bit color depth) > if the average RGB value < 128 > draw text in white > else > draw text in black > > There are two possible approaches: > 1) check per-applet > 2) check per-character Approach 2 could look very ugly, it's hard to read text when the color changes inbetween words. But there's another way to make text readable when the background is unknown/changing: draw an outline you could take the standard theme forground color to draw the text, and draw an outline around that text. If the foreground color is dark, draw a white outline. Otherwise, draw a black outline. That way, the text is always visible and you don't have to worry about your background. Of course, drawing an outline is expensive. Perhaps a drop shadow is enough. -- Martin Waitz
Attachment:
pgpiK5OlbqbrJ.pgp
Description: PGP signature