How to determine inverse color?
Posted by Filip Rooms on Jan 06, 2006; 4:17pm
URL: http://imagej.273.s1.nabble.com/How-to-determine-inverse-color-tp3704104.html
Dear list,
Does anybody have an idea how to determine an inverse color? I don't
know if this is the appropriate term, but the problem is this: if you
want to draw markers in an image, we want these markers to have
optimal contrast with the background.
For black and white, this is easy. But what for example with an RGB
image, 8 bits per channel, where an area has values R=128 G=128 B=128
(i.e., exactly half way the dynamic range of the intensities per
band).
So, is there some kind of algorithm that, given a certain color (i.e.,
a set of RGB values), produces automatically in all cases the color
that provides optimal contrast on screen?
Many thanks in advance,
Kind regards,
Filip Rooms