Find Reverse Color
-
How can I find a reverse of a color? Actually what I need is a color that will be readable on another background color. For example if the background is white, the color would be black, if the background is dark green, the color would be white. I tried using GetBrightness() of color to determine whether to use white or black, but that doesn't seem to work.
-
How can I find a reverse of a color? Actually what I need is a color that will be readable on another background color. For example if the background is white, the color would be black, if the background is dark green, the color would be white. I tried using GetBrightness() of color to determine whether to use white or black, but that doesn't seem to work.
I recall reading a trick that mite work (not sure if it on works for 8 bit colors), but i forgot now :doh: (has to do with an XOR with -1 or just using the complement of an int, a color is just an int). But be inventive, try this:
A2 = 256 - A1;//now this would be dumb
R2 = 255 - R1;
G2 = 255 - G1;
B2 = 255 - B1;Mite work, let me know, im interested in what works :) [edit] this works pretty good [edit] top secret