Change colour of text dependent on immediate background colour
Some of my jobs involve text being placed on a background image or company logo. Often,, this background has wildly contrasting colours/shades and the text immediately in front of it becomes invisible. I then change the colour of that text from, say, black to white, to render it visible again.
Unfortunately, if there are then any amendments to the text, the white text now lies over a light background and becomes invisible. Currently, I just go over the text with a beady eye and make the amendments accordingly.
Is it, would it, be possible for there to be a script, plug-in or similar that says,"'if the background is darker than this shade, make the text white but if the background is lighter than this shade, make the text black". Obviously, the colours/shading would be flexible.
Many thanks.