Hi,
I was wondering whether it is possible to draw text in a color that depends on the
actual background color under each pixel of the text bitmap, for optimal readability (contrast). As a simple example, let's say I am annotating a plot, mostly on a white background, but the existing plot is in black.
If I print black text (which is fine for the bits with white background), I would like the pixels of the text to be white rather than black, if I am printing above a pixel that was already drawn in the plot. Right now I'm really interested in this simple black/white case.
More generally speaking, for a multi-colored background, it would also be nice to be able to draw in a sort of complementary color that maximizes contrast.
Any suggestions how to achieve this in Processing?
Thanks in advance,
Marc
1