After some fiddling I built a new function for the rubberband/page border color which:
1 intuitively preserves the rectangle's own color and transparency (this is relevant for page border whose color is settable)
2 intuitively inverses the color of the background
3 despite 2, does not have a "blind spot" for gray backgrounds!
Regular inversion maps color 808080 to itself, so an inversion rubberband rectangle is invisible over a background with that color. I solved this without introducing rotation or other non-intuitive color transformations. Namely, my function looks _almost_ like inversion over dark backgrounds, but is a bit lighter than pure inversion. Over light backgrounds, on the contrary, it is a bit darker than pure inversion. Between 7f7f7f and 808080, there's a discontinuity that jumps from a-bit-darker to a-bit-lighter or backwards. As a result, there's no color that will render such a selection rectangle invisible.
_________________________________________________________________ Find and compare great deals on Broadband access at the MSN High-Speed Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/