Hello,
First get RGB of color you want to complement and then use 255-R, 255-G, 255-B
Best regards,
Tomasz Janeczko
amibroker.com
On 2010-07-05 15:42, Herman wrote:
Would any one know how to create an opposite color that contrasts strongly with
another?
I have buttons and other chart features that change color frequently subject to some condition. This works nice however when, for example, I set text-color to
black and the background changes also to black I can't see the text anymore. In this case I would like to have the text color automatically change to white.
I need a function like GetComplemtaryColor( BackGroundColor ) which always
returns a high contrast color wrt the background - for any background color.
This seems a common requirement but I can't find a nice solution.
Can anyone help?
Many thanks,
herman